I need help with Robocopy on Windows 2003 servers. I want to move all .wav files and exclude the rest while maintaining the folder structure...thanks

Thor2923
Thor2923 used Ask the Experts™
on
I need proper syntax to robocopy from \\server\w:\bulk (but .wav files only and maintain folder structure) to \\Server\G:\

This is on an old Win 2003 server. I know the /MT option is not available...what is the best syntax to get all the .wav files, exclude everything else but maintain the folder structure?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2018
Distinguished Expert 2018
Commented:
Minimum:
robocopy.exe "\\SourceServer\W$\bulk" "\\TargetServer\G$" *.wav /s /r:0 

Open in new window

Replace the /s with /e if you want to keep the folder structure even for empty folders.
Add /COPY:DATSO to copy permissions and ownership. Remove the O to only copy permissions, without ownership

Author

Commented:
thanks and my copy is running smooth but why R:0? I always use R:3
Most Valuable Expert 2018
Distinguished Expert 2018

Commented:
Because in a stable internal network, there's usually no point in trying more than once (that is, the initial attempt); if a file fails in this situation, it's more than likely that it will fail in the following attempts as well. /r was made with unstable connections in mind. It's usually just not worth the wait.
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Author

Commented:
just when i thought my problems were over, I realized the Target USB drive I am copying to is only 1.81TB even though the outside of the box said 2TB. I know the source folder is 1.95TB including all files, but the robocopy is copying only .wav. It is going to be a nail biter but my target drive may run out of space. Do you know the order the Robocopy command is copying the files? Alphabetical? Time Stamp? There is a chance this copy may run out of space and I may need to copy the rest on to another USB drive. I am hoping there is an easy way to find where it stopped and where I need to pick up
Most Valuable Expert 2018
Distinguished Expert 2018

Commented:
Because the drive manufacturers define 1 TB as 1000000000000 bytes.
robocopy copies by folder.
You can always stop it right now while it's still running, then add
/np /tee /log:C:\Temp\robocopy.log

Open in new window

to the options and run the command again. It will by default skip files already in the target.
This will give you a log file where you can identify where it stopped (if it did). robocopy doesn't support delta copies to a third folder.

Author

Commented:
don't I need a \XC switch to skip what has already been copied?
Most Valuable Expert 2018
Distinguished Expert 2018

Commented:
No. Again: robocopy will by default skip files already in the target.

Author

Commented:
ok, I took your advice and it is copying but sure looks different. I see entire paths being copied like \\server01\w$\bulk\20140230 slowly moving up my screen instead of individual files flying by
Most Valuable Expert 2018
Distinguished Expert 2018

Commented:
Shouldn't be doing that. Is one of the drives a NAS with some Linux based OS?
Try to add /FFT to the options.

Author

Commented:
oh never mind once it read the files that had already been copied it started flying again!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial