Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch Freezes
Name: stroke6463 Date: June 26, 2006 at 16:40:54 Pacific OS: XP SP2 CPU/Ram: idk
Comment:
I made a batch that freezes on the line FOR and will stay there forever. If I press 'Control-C', it asks if I want to terminate the program. If I type 'n' to not terminate it, the batch continues. Any ideas? Thanks.
REM Delete Last Years Files @echo off
for /f "tokens=*" %%A in ('dir /b f:\*.* /s /a-d') do (Call :test %%A)
:test set file=%* del c:\progs\temp.txt del c:\progs\temp2.txt for /f "tokens=3 delims=/ " %%A in ('dir "%file%"') do (echo %%A >> c:\progs\temp.txt) findstr /n . c:\progs\temp.txt > c:\progs\temp2.txt for /f "tokens=2 delims=:" %%A in ('findstr /b "4:" c:\progs\temp2.txt') do if %%A lss 2006 echo %file% >> delete.txt )
Name: stroke6463 Date: June 26, 2006 at 18:12:22 Pacific
Reply:
Nevermind, I redirected the dir to a text file and it created a 500MB text file just for the files on F:. It was just taking a really long time. Thanks anyway.
Summary: Is it possible to write a batch file that will grab a website picture when executed? I do weather research and the download mgr I use will only do about 50 maps then it freezes. If I can write a batch...
Summary: As far as I know, when the batch window is out of focus, the window freezes until the window is in focus. So you could start play.exe and then exit after you execute play.exe and it's in focus. -- ...
Summary: How can I count a specific character in a line using a batch file Ex: if I pass a line "c:\dir1\dir2\dir3" to the batch file to count "\" then it should return 3. ...