Solved

robocopy switches

Posted on 2014-01-23
2
265 Views
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"?
0
Comment
Question by:hrolsons
2 Comments
 
LVL 29

Expert Comment

by:becraig
ID: 39805219
Robocopy source destination /XF  *f.jpg
0
 
LVL 52

Accepted Solution

by:
Joe Winograd, EE MVE earned 500 total points
ID: 39805270
Where do things stand on your other similar question?
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Windows_7/Q_28345765.html

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.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cloud Backup -- search by date range ? 1 40
Clone OS to SSD 5 49
Two different visual studio versions 3 22
Copy dir and files with robocopy 2 32
You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now