Monday, September 17, 2012

Robocopy used to move, copy files from one server to other server

Reference:
http://technet.microsoft.com/en-us/library/cc733145.aspx


:begin
@echo off

@set SourcePath=\\<<Server Name>>\<<Folder Name>>
@set DestinationPath=\\<<Server Name>>\<<Folder Name>>

echo --- Moving Files from one Server to Another Server  ---
ROBOCOPY %SourcePath% %DestinationPath% /mov


if errorlevel == 0 goto :success

echo ### Error in Moving Files from %SourcePath% to %DestinationPath%
echo .
goto end

:success
echo Successfully Moved Files from %SourcePath% to %DestinationPath%
echo .
goto end

:end


No comments:

Post a Comment