I'll try that and let you know of the results.
Main Topics
Browse All TopicsHello,
We are using microsoft's Robocopy software to copy and sync files between 2 servers. The data size of the source is 160Gb. We ran a first robocopy to copy everything from the source to the target server.
I wanted to schedule the script to run every 15 minutes to copy only modified files from the source to the target, this way we would have the newest files every 15 minutes.
The problem is that the script takes forever to run when running every 15 minutes, it takes a long time to start verifying the status of files and then it seems to be very slow to verify those modified.
Is there anything wrong with the script? Can it be improved to run faster?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Haven't worked with richcopy, but the main issue is probably just the amount of files, unless these files are mostly rather large.
You can try if robocopy's /MOT:m switch helps.
Instead of running the command every 15 minutes, run it once, and add
/MOT:15
to the command line. robocopy will then *not* stop running, it will monitor the source and run again after 15 minutes if it detects any changes.
You can add a /TEE as well, that way you can monitor the output directly as well as having it in the log file.
Any expert with RichCopy experience can help?
This script is working properly, except the logging part, it does not log anything, but otherwise it seems to running and ending successfully.
"C:\Program Files\Microsoft Rich Tools\RichCopy 4.0\richcopy.exe" "E:\Partage\Publique" "\\192.168.99.14\e$\DATA\S
But the same script with a lager portion of files does not work. Would there be a reason to why it does not work with 160gb, but it works with 80gb?
I was able to get the command to create a log file, the problem was tue columns, richcopy does not use columns in its commands. Now the problem seems different, everytime I start the script, richcopy crashes.
Here's the error from the event log: Faulting application RichCopy.exe, version 4.0.217.0, faulting module ntdll.dll, version 5.2.3790.3959, fault address 0x0002caa2.
Hanging application RichCopy.exe, version 4.0.217.0, hang module hungapp, version 0.0.0.0, hang address 0x00000000.
I get that everytime I run the scrip.
Would you like to try this batch file?.....
:: ==========================
:: SYNCFILES.BAT - Written by Paul Tomasi 2009
::
:: Synchronise files betweens two folders
:: ==========================
@echo off
:: --------------------------
:: Initialise paths
:: --------------------------
set source=E:\Partage\Publique
set destination=\\192.168.99.1
set logfile=C:\tech\LOG\DATA.t
:: --------------------------
:: Initialise logging of current session
:: --------------------------
echo %date% %time%>>%logfile%
:: --------------------------
:: Purge files from destination that do not exist in source
:: --------------------------
echo.
set /p .=Purging files from %destination%<nul
for %%a in ("%destination%\*.*") do (
set /p .=.<nul
if not exist "%source%\%%~nxa" (
echo Deleted: %%a>>"%logfile%"
del /q "%%a"
)
)
echo.
echo.
:: --------------------------
:: Synchronise files between source and destination
:: --------------------------
set /p .=Synchronising files<nul
for %%a in ("%source%\*.*") do (
set /p .=.<nul
if not exist "%destination%\%%~nxa" (
echo Copied: %%a>>"%logfile%"
copy /y "%%a" "%destination%\" >nul
) else (
call :comparedatestamp "%%a" "%destination%\%%~nxa"
)
)
echo.
exit /b
:: --------------------------
:: Synchronise existing files if datestamps differ
:: --------------------------
:comparedatestamp
if not "%~t1"=="%~t2" (
echo Copied: "%1" to "%2">>"%logfile%"
copy /y "%1" "%destination%\" >nul
)
goto :eof
Here's an express version. This should fly through your files......
@echo off
set source=E:\Partage\Publique
set destination=\\192.168.99.1
set logfile=C:\tech\LOG\DATA.t
echo %date% %time%>>%logfile%
for %%a in ("%destination%\*.*") do (
if not exist "%source%\%%~nxa" (
echo Deleted: %%a>>"%logfile%"
del /q "%%a"
)
)
for %%a in ("%source%\*.*") do (
if not exist "%destination%\%%~nxa" (
echo Copied: %%a>>"%logfile%"
copy /y "%%a" "%destination%\" >nul
)
)
exit /b
Business Accounts
Answer for Membership
by: oBdAPosted on 2009-08-20 at 09:14:28ID: 25144292
Get rid of the /V (why do you need to log about a 160GB worth of skipped files?), robocopy is probably more busy logging than copying.
Use /NFL and /NDL instead; even with /nfl and /ndl, errors will still be logged, but you won't have your log file filling up with entries of successfully copied files.