How to Robocopy files

Copying files between servers can be a frustrating task especially when you have huge amount of data to be copied across and if the network link is not always stable the usual "Windows" copy and paste will defiantly not work!
So this is when Robocopy comes in handy, I use it all the time to copy file and folders across and it does do a pretty good job. So here is the how you can run the command and ofcourse you will need to have "Robocopy.exe" the same folder you are running your batch file from. (On Windows 7 the utility is installed by defaut)

set /P date="Please enter the date (no spaces):"
md c:\rbcf\%date%
robocopy "Source" "Destination" /E /TEE /Z /w:0 /r:200 /LOG:c:\rbcf\%date%\dom.txt

robocopy "C:\dell\Bios.txt" "\\server-name\c$\Dell\" /E /TEE /Z /w:0 /r:200 /LOG:c:\rbcf\%date%\dom.txt

The above example makes the destination same as the source and does not delete any data, in case you want to delete the source files after the data has been copied over to the destination server, you will have to use the /MOVE switch along with your command

/E : Copy Sub folders, including Empty Sub folders
/SEC : Copy files with security
/MOV : Move files (delete from source after copying)
/MOVE : Move files and dirs (delete from source after copying)
/Z : Copy files in restart able mode
/R:n : Number of Retries on failed copies - default is 1 million
/W:n : Wait time between retries - default is 30 seconds
/TEE : Output to console window, as well as the log file