troubleshooting Question

FOR loop can't find fileset.

Avatar of Beaker1974
Beaker1974 asked on
Microsoft DOSWindows 2000Windows Batch
3 Comments1 Solution442 ViewsLast Modified:
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!"
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros