I\'m trying to use a batch file to move files in blocks of 30 if there are less than 20 files in %DataLoc%. I modified code from a prior question. The problem
Your script uses incorrect syntax for the loop variable in one of the two loops:
FOR %F IN (c:\Play\hold\*.tmp) DO …
Just try changing %F to %%F. Single percent sign plus letter is the syntax for loop variables when running loops directly from the command prompt. In batch scripts you should always use double-percent references for loop variables, just like in your FOR /F %%a loop.