Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create .cmd file with loop

Status
Not open for further replies.

erock24

Technical User
Aug 14, 2009
4
US
I'm trying to create a looping .cmd file.
my current .cmd file looks like this

Code:
CALL splitfile.pl Test1.csv
CALL splitfile.pl Test2.csv
CALL splitfile.pl Test3.csv

(I could have as many as 50 Test(x).csv files.)
It runs the perl script on the identified file in the folder. It works but I would like it to loop through all .csv files named "Test(x)" and run the script so that I don't have to have 50 lines in my .cmd file.
Note: the perl script creates additional .csv files in the folder so the .cmd code would have to know to run on only Test(x).csv files.

Is this possible??
 
In a console window type the following:
FOR /?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top