Paul
Mar 4 2007, 07:49 AM
I have a folder in my C: drive
I need to write a batch file to copy the contents of that batch file to a folder on a server
it needs to overwrite the files without prompting yes or no
how do I do this?
(stupid clients, not for me)
then from another pc
I need to write a batch file that goes and grabs the contents of that folder and dumps it on my local drive
W@RP@T}{
Mar 5 2007, 12:11 AM
Paul, it's pretty simple
Just do a IF NOT EXIST C:\FolderBla
MD C:\FolderBla
Xcopy \\PC1\<folder you've shared> C:\FolderBla /r /d /y
W@RP@T}{
Mar 5 2007, 12:14 AM
What's good about the /r /d /y
Is that it only overwrites the files if the files from the source are newer than the existing files and it does it without prompting.
thus if you have a file that you need to update on a whole bunch of machines you just share a directory where it will compare the file to the one on their machine to the one shared and overwrite if needed.
You can also use these in logon scripts etc. I keep about 100 templates in sync on the network via logon.