Cannot use a FOR LOOP on a batch file
Posted: 2014-05-04T11:43:24-07:00
Hi everybody!
I have a batch file (MS-DOS) containing inside multiple FOR LOOPS with variables %%a or equivalent and strings like this:
for /F "usebackq tokens=1,2 delims=,:" %%X ^
in (`%IM%convert convert RPS.bmp txt:^|find "%colorRPS%"`) ^
do (
set /A sigXRPS+=%%X
set /A sigYRPS+=%%Y
set /A nCountRPS+=1
)
I need to process, in the same way, a set of images, all named for example "test1.bmp", "test2.bmp", "test3.bmp"... etc etc... say like 30 pictures.
I tried to put a big FOR %%a IN (test*.bmp) DO (...) and put inside all my batch code, but I can't find a way of making it work...
inside the batch code there are some variables that are defined along the way and echoed later, as well as names of output files (both images and text files) that are created and then erased or combined.
Why is my FOR LOOP not working?
Any suggestions?
thanks!
I have a batch file (MS-DOS) containing inside multiple FOR LOOPS with variables %%a or equivalent and strings like this:
for /F "usebackq tokens=1,2 delims=,:" %%X ^
in (`%IM%convert convert RPS.bmp txt:^|find "%colorRPS%"`) ^
do (
set /A sigXRPS+=%%X
set /A sigYRPS+=%%Y
set /A nCountRPS+=1
)
I need to process, in the same way, a set of images, all named for example "test1.bmp", "test2.bmp", "test3.bmp"... etc etc... say like 30 pictures.
I tried to put a big FOR %%a IN (test*.bmp) DO (...) and put inside all my batch code, but I can't find a way of making it work...
inside the batch code there are some variables that are defined along the way and echoed later, as well as names of output files (both images and text files) that are created and then erased or combined.
Why is my FOR LOOP not working?
Any suggestions?
thanks!