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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

For Next Loop

Status
Not open for further replies.

chomps303

MIS
Sep 30, 2003
83
US
I am a unix guy, How do I do a for next loop

in Unix:

for name in `cat filename`
do
cp $name newname
done


Is it possible to do this in dos?

Thanks

Brandt
 
If you are referring to a batch file or from the dos prompt

for %1 in ( *.* ) do type %1

works from the command prompt.

for %%1 in ( *.* ) do type %%1

works in a batch file.

rgds
Zeit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top