Microsoft RichCopy batch script example

@ECHO OFF
:: Batch script example for Microsoft RichCopy 4.x
:: Ref: http://blogs.technet.com/b/ken/archive/2009/04/29/multi-threaded-file-copy-richcopy.aspx#3372805 
:: 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"

GOTO :EOF

:RICHCOPYFOLDERS
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%

GOTO :EOF

Comments :

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

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...
on 

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.