![linux copy log directory to remote host linux copy log directory to remote host](https://advantech-ncg.zendesk.com/hc/article_attachments/360045588191/mceclip4.png)
*EXTRA File 15369 fix wwwww\ full hard drive fills.docx *EXTRA File 123 wwwww\ SQL SA password.txt *EXTRA File 165 wwwww\ Login and Support info.txt *EXTRA Dir -1 \\yyyyyyy\t$\Documentation\Applications\Server Applications\wwww\ *EXTRA Dir -1 \\yyyyyyy\t$\Documentation\Applications\Server Applications\ *EXTRA Dir -1 \\yyyyyyy\t$\Documentation\Applications\ *EXTRA Dir -1 \\yyyyyyy\t$\Documentation\ Options : *.* /S /E /DCOPY:T /COPY:DATS /PURGE /MIR /R:1 /W:1 I did robocopy to copy my folder from one server to another. In your case, copying from one source to a destination and then from another source to the same destination, I would have foregone the /MIR switch for just /E (copy all folders including empty ones). When in doubt use the /L flag which won't actually move/copy/remove any files, but will write the results to your specified log file. MIR can be dangerous but usually only until it's bitten you once, then you make sure you know how it's going to work first. You then ran the same script from Server B to Server Z (changing the source name obviously) but if this had the /MIR flag it wouldn't find the "Development" folder on Server B and would wipe it out. You copied "Development" from Server A to Server Z, no problems. I think I see what your problem is, though. If you have the log file you can see what was copied, not copied, removed, etc. When one of the development people went into the development folder (first one copied over) late last night, it was empty.Īlways a good idea to change the batch file name and log file name between runs, unless you use my batch file which uses the time and date also. I did have an older folder with the name development so, I put it under a new folder called old stuff. I copied over the rest of the folders from another server to the new server. I copied over a directory (development) from one old server to the new one with no flaws. Hey starg33ker's, solution worked great with one exception. "c:\Program Files\blat322\full\blat.exe" -attach "%logpath%%filename%" -server -u -pw inplaintext -f -t -subject "Subject" -body "Robocopy Log File" ::robocopy %sourcepath% %destinationpath% /MIR /V /ETA /COPYALL /R:0 /W:0 /NP /MT /LOG+:"%logpath%%filename%" /TEE ::robocopy %sourcepath% %destinationpath% *.vbk /MINAGE:2 /MAXAGE:7 /MIR /V /ETA /COPYALL /R:0 /W:0 /NP /MT /LOG:"%logpath%%filename%" /TEE Robocopy %sourcepath% %destinationpath% /E /R:15 /W:5 /LOG:"%logpath%%filename%" /NP /MIR ::Include format yyyy-mm-dd#hh-mm-ss.ms in log filename ::TEE Output to console window as well as log file ::(MINAGE:) Exclude files newer than n days ::(MAXAGE:) Exclude files older then n days ::(MT) Do multi-threaded copies with n threads (default 8). ::COPYALL Copy all file info - equivalent to COPY:DATSOU ::(NP) do not include progress txt in logfile this keeps filesize down