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

directory

Status
Not open for further replies.

peteswrx

Programmer
Sep 16, 2002
12
0
0
US
Is it possible to have a directory (named A, for example) that I can save documents to and once they are saved to that folder, an automatic copy will be sent to 2 different directories (directories B and C)?
 
i guess i'm asking for how to write a batch file for this huh?
 
copy and paste this into NOTEPAD, save as a .bat file (instead of .txt) then schedule it to run every so often in the task scheduler (i'd say hourly unless you need the info that to update that often)

Code:
cd ..
copy c:\DIRECTORYA\*.* c:\DIRECTORYB\ /y
copy c:\DIRECTORYA\*.* c:\DIRECTORYC\ /y
just substitute the directory names/locations with what you want. If you want to copy the files to different shared folders over the network, do this
Code:
cd ..
copy c:\DIRECTORYA\*.* \\COMPUTER1\sharedfoldername\ /y
copy c:\DIRECTORYA\*.* \\COMPUTER2\sharedfoldername\ /y


The only thing you have to know is how to find the answer.

If it weren't for users, computers would work just fine....If computers worked I'd be unemployed!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top