Subj : A little batch file magic
To : Sean Dennis
From : Peter Knapper
Date : Mon Jan 16 2006 05:40 pm
Hi Sean,
SD> I'm trying to remember how to move certain files in a
SD> directory to another directory in a batch file. I
SD> want to copy the packets I get in in BT's inbound to a
SD> backup directory (that's saved my bacon before), but
SD> not all of the other files I get (TICs, ZIPs, et al).
SD> I was thinking that this might do it:
SD> for in (*.mo? *.tu? *.we? *.th? *.fr? *.sa? *.su?) copy * d:\backup
From the command line that should be -
for %f in (*.mo? *.tu? *.we? *.th? *.fr? *.sa? *.su?) copy %f d:\backup
That way you don't drop the FOR part and get everything with * ........;-)
And if its in a batch file then its -
for %%f in (*.mo? *.tu? *.we? *.th? *.fr? *.sa? *.su?) copy %%f d:\backup
Cheers.............pk.
--- Maximus/2 3.01
* Origin: Another Good Point About OS/2 (3:772/1.10)