Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×


  • Posts

  • Joined

  • Last visited

  • Donations

  • Country


About Haris1977

Profile Information

  • OS
    Windows 7 x86

Haris1977's Achievements



  1. Thanks for your answer I ve managed to create this script: del /s /f /q "C:\Windows\Prefetch\*.*" del /s /f /q "C:\Windows\Temp\*.*" del /s /f /q "C:\Users\Haris\AppData\Local\Temp\*.*" echo Deleting Files! timeout /t 3 While it works, inside "prefetch" folder there are still 4files that are recreated when the batch file ends: CMD.EXE-8E75B5BB.pf CONHOST.EXE-E6AFC9F5.pf TIMEOUT.EXE-579F197A.pf DLLHOST.EXE-57A853C4.pf Any idea why those files are re created?
  2. Greetings I m trying to create a batch file in a way that - if i run it - it will delete the content inside specific folders: Those folders are the below: C:\Windows\Prefetch C:\Windows\Temp C:\Users\Haris\AppData\Local\Temp Can anyone help? Thanks
  3. Thanks for your suggestion. Meanwhile i ve managed to do it, but anyway thanks. Topic is considered closed:)
  4. I have the english version if this is what you mean. Will try your code tomorrow in work as i am home as we speak. I will report back Where should i put this code? Cause i have already one formula in column A
  5. Greetings. I m trying to do some indexing in my company (using excel 2016) and i would like to: A) Be able to insert a 3 digit code (from A4 until A10000 cell) but when i write this code to AUTOMATICALLY have a prefix of 2020 (lets say if i write 2XL the result will be 2020.2XL) B) The 3 digit code should be UNIQUE (so the A4:A10000 should have unique values) => i ve done it I ve managed to achieve B. Can anyone help with A?
  6. @ECHO OFF SETLOCAL ENABLEEXTENSIONS SET BaseRAnge=192.168.1 SET Min=100 SET Max=115 :loop SET Counter=0 FOR /L %%A IN (%Min%,1,%Max%) DO ( ECHO Pinging %BaseRange%.%%A PING -n 1 %BaseRange%.%%A >nul 2>&1 &&SET /A Counter+=1 ) IF %Counter% LEQ 1 ( ECHO Successful ping %Counter% rundll32.exe powrprof.dll,SetSuspendState 0,1,0 ) ELSE ( REM Poorman's WAIT REM Very roughly 60 second intervals REM it would be much better to use AT, SCHTASKS or any of the n third party "WAIT" tools FOR /L %%B in (0,1,4100) DO PING -n 1>nul GOTO :loop ) that crushes my crashes my cmd:(
  7. Thanks GunSmokingMan for your help but this isnt exactly what i want . Anyway your help is highly appreciated ! I think i ll have to dig into scripting to make it work though.. Besides i have made some alternations on my first post, because it wasnt exactly what i wanted..The ip of the server that the script is going to be run is So what i want is this (slightly different from my 1rst post) 1) Ping a range of ip's ( to 2) If the script finds >= 2 IP's replies from the specific range (one is which is my server's ip, so it is always "on") it continues to ping the ip's. Thus mean it would loop all ip's all the time. It would be nice a e.g 5 min pause and then restart pinging 3) If the script finds exactly 1 active ip reply (the then my server will go to sleep (not restart, not hybernate). 4) If pc wakes then restart all steps 1-3 I think i can achieve 4 step with the help of a task scheduler. In other words this is a diagramm with what i want ping to active ip reply=1 then run this command –> rundll32.exe powrprof.dll,SetSuspendState 0,1,0if active ip reply is >=2 then auto restart the script Anyway thanks:)
  8. Thanks jaclaz. But when i run it and the line goes to pinging the script stops. It doesnt make my pc to sleep.. Same thing happens when an ip is active..Smth is missing here..
  9. Greetings I am trying to make a batch file (i guess a *.bat would be ok) but i am not a proggramer. What i want to do is a bat file with 4 steps: 1) Ping a range of ip's ( to 2) If the script finds at least ONE active IP from the specific range (e.g it continues to ping the ip's. Thus mean it would loop all ip's all the time 3) If the script doesn't find ANY active ip then make my server pc to sleep (not restart). I think the cmd command is : rundll32.exe powrprof.dll,SetSuspendState 0,1,04) If pc wakes then restart all steps 1-3 My server pc is a win7 ultimate X86 laptop Is that possible? Thanks!

  • Create New...