We recently encountered a situation where we needed to sync various files from one server to another on an on-going basis. To do that we create a folder on the root of our origination server and called it Robocopy.
Within that folder we created a copy.bat file with a very simple argument following the command structure of:
robocopy <Source> <Destination>
Our command specifically says:
robocopy c:\myFolder \\extranet\c$\myFolder /MIR /LOG+:robo.logThis essentially is saying take everything from the C:\myFolder folder and copy it to the \\extranet server's C:\myFolderfolder.
The /MIR command mirrors a directory tree and the /LOG command tells it to writes the status output to the log file (appends the output to the existing log file).
0 comments:
Post a Comment