FOR loop can't find fileset.
Posted on 2007-07-26
I have a DOS batch file (win2k) that takes one arguement of a set of files, uses that arguement in a FOR /F statement and runs a utility for each of the entries on each of the lines, for each of the files that the FOR /F loop goes through.
I swear it worked 6 months ago, and now I need to run it again, and it keeps telling me "The system cannot find the file" of the arguement I put into the batch..
For example, lets say I have some files that end in .txt in a directory, so I run my batch with the *.txt arguement.
Instead of going through each *.txt file in the directory and running the FOR loop, it'll only give me the message "
The system cannot find the file *.txt.
What could I possibly be doing wrong?
here's the file...
echo Called with %1
FOR /F %%a in (%1) do C:\m2o\awk95 -f c:\m2o\sortu.awk < %%a > _%%a