|
Answer» hi
i wish to do the following. i'm running win2k on an NT server
i have a file that I have to copy to 7 different directories on a regular basis. The file which i have to copy changes each time i'm supplied with a new one. I therefore wish to SET upan automated routine that will take the file which i'm supplied with and import it into each of the 7 direcories, can anyone suggest how i'd do this ?
Is this achievable using dos ?
cheers
chrisHow bout this: Create a batch file CALLED COPY7.BAT that CONTAINS these commands:
@echo off copy %1 \loc1\*.* copy %1 \loc2\*.* copy %1 \loc3\*.* copy %1 \loc4\*.* copy %1 \loc5\*.* copy %1 \loc6\*.* copy %1 \loc7\*.*
If you want to copy a file called COPYME.TXT to those 7 locations, just issue the command COPY7 COPYME.TXT. The \*.* at the end of each COPY line assures that if you specify a non-existent folder, that you'll receive the message "The SYSTEM cannot find the path specified", as you should. If you do not include the \*.* and the folder loc1, loc2, etc do not exist, you'll get seven files named loc1, loc2, etc that each contain the contents of COPYME.TXT. cheers curt, works perfectly
|