FOR loop can't find fileset.

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
echo "Done!"
Who is Participating?
SteveGTRConnect With a Mentor Commented:
I'd get rid of the /F and give it a try.
Beaker1974Author Commented:
That worked!  Why would the /F be the problem?
That's used to work on the output from commands one line at a time or to read the contents of a file one line at a time. Each line is referenced using %%a.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.