Search found 3 matches
- 08 Apr 2008 07:52
- Forum: DOS Batch Forum
- Topic: Sort files in name order in a FOR loop
- Replies: 1
- Views: 10916
Sort files in name order in a FOR loop
I would like to order the files read in a directory (alphabetically, as in a DIR /o), in a FOR loop. using the following commands at present. Any help appreciated. set echo off SETLOCAL ENABLEDELAYEDEXPANSION rem "clear var" set D= set T= set S= set E= rem "set vars" set /p D=[En...
- 07 Apr 2008 23:53
- Forum: DOS Batch Forum
- Topic: Incremental count in a FOR loop
- Replies: 4
- Views: 10903
Thanks JaffaMuffin
That's sorted it had to take out one of the lines which kept setting H to E, then worked fine. now looks like. for %%F in (%D%) do ( set /a E=!E!+1 echo.!E!>>F:\ipodTvShow\BAT_Scripts\test.txt echo."D:\My Downloads\ipodTvShow\AtomicParsley.exe" "%%F" --stik "TV Show" --...
- 07 Apr 2008 12:24
- Forum: DOS Batch Forum
- Topic: Incremental count in a FOR loop
- Replies: 4
- Views: 10903
Incremental count in a FOR loop
Hope you can help, trying to increment a count inside a for loop. see below. for %%F in (%D%) do ( set /a H=%E% set /a H=%H%+1 echo."AtomicParsley.exe" "%%F" --stik "TV Show" --TVShowName "%T% Season %S%" --TVSeason %S% --TVEpisodeNum %H% --artist "%T% Se...