Microsoft RichCopy batch script example

:: Batch script example for Microsoft RichCopy 4.x
:: Ref: 
:: Save as richcopyfolder.bat and go to sleep.

CALL:RICHCOPYFOLDERS "D:\DATA\Source\2010\12\" "\\FileServer\Data\Destination\2010\12"
CALL:RICHCOPYFOLDERS "\\FileServer\Data\Destination\2010\12" "\\FileServerArchive\Data\Destination\2010\12"


SET src=%1
SET dst=%2

SET opt=/NE /NC /QN /TS 256 /SC 10000 /TD 256 /TP 2 /FC 4096
SET rcpath="C:\Program Files (x86)\Microsoft Rich Tools\RichCopy 4.0\RichCopy64.exe"
SET parms=%opt% %src% %dst%

ECHO %rcpath% %parms% >>CopyLog.log
%rcpath% %parms%


Comments :

2 comments to “Microsoft RichCopy batch script example”
Tim said...

Nice script Bob, thank you for posting.

I'd like to use a batch like this one to do the backup but then e-mail a log file but only if there's errors.

I've been playing with this for a few weeks now but haven't quite mastered it yet (mainly because I can't get file extension exclusions and folder exclusions to work properly).

Any ideas? Thanks again.

Bob Mihada said...

Have you tried fiddling with with the GUI, Actions-->Copy Options_Files to be Excluded?
You can check and uncheck and set name values, then click over to -->Others, to see respective Command line parameters. Check this out:

/FEF "*.exe;*.bat" /FED "system32"

This should exclude any files ending with .exe or .bat and any directory named system32.