I have numerous file in the current directory (FILE.1.txt, FILE.1.txt, FILE.3.txt, etc.) and am attempting to use the FOR command in a .bat file as follows:
FOR /F %%FILE IN ("FILE.*.txt") DO java -cp .;../. myJavaClass CONSTANT %%~nxFILE %%~nFILE.tmp %%~nFILEout.txt
passing various forms of the filename as parameters to the Java class. Unfortunately, this fails with the message:
%FILE was unexpected at this time.
Thanks in advance for any help you may be able to provide.