TIP: Click on subject to list as thread! ANSI
echo: os2bbs
to: Sean Dennis
from: Peter Knapper
date: 2006-01-16 17:40:08
subject: A little batch file magic

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)
SEEN-BY: 633/267 270
@PATH: 772/1 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.