robocopy switches

Posted on 2014-01-23
Medium Priority
Last Modified: 2014-01-24
What switches would I use if I wanted to copy everything but want to skip any file that ends in "f.jpg" or "o.jpg"?
Question by:hrolsons
LVL 29

Expert Comment

ID: 39805219
Robocopy source destination /XF  *f.jpg
LVL 58

Accepted Solution

Joe Winograd - EE Fellow & MVE earned 2000 total points
ID: 39805270
Where do things stand on your other similar question?

Just as I explained /xc /xn /xo in that question, there's also /xf:

/XF file [file]... :: eXclude Files matching given names/paths/wildcards

The /xf allows multiple file specs, so the answer is:

robocopy c:\sourcefolder e:\destfolder /xf *f.jpg *o.jpg

Of course, the source and destination are whatever folders you want them to be. And as I pointed out yesterday, /s includes non-empty subfolders and /e includes all subfolders, including empty ones. Btw, in yesterday's question, I attached the full Robocopy syntax for you in a file called <robocopy-help.txt>. Regards, Joe

P.S. The first answer above was almost right but it is missing the *o.jpg file spec.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
Among the most obnoxious of Exchange errors is error 1216 – Attached Database Mismatch error of the Jet Database Engine. When faced with this error, users may have to suffer from mailbox inaccessibility and in worst situations, permanent data loss.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

619 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question