There seems to be a bug with the Windows 7 batch file \'for\' command. This command can walk through a source directory and return one filename at a time. But I found that
So far I can only suggest replacing the FOR /R loop with FOR /F that uses the output of DIR /S:
FOR /R
FOR /F
DIR /S
FOR /F "delims=" %%s IN ('DIR %1 /S /B') DO CALL :do1file %%s …