Solved

Excluding files with Robocopy

Posted on 2007-11-16
7
25,907 Views
Last Modified: 2014-06-10
I have an established RoboCopy script that I use when a user gets a new PC to copy files from My Documents from the current PC to the user’s new PC. I need to be able to exclude files like MP3, WMA etc. I know you have to use the /XF command, but I am not able to find a good example. Can someone help?
0
Comment
Question by:Mister_Spock
7 Comments
 
LVL 19

Expert Comment

by:darron_chapman
ID: 20302240
robocopy [source directory] [destination directory] /S /XF *.mp3 *.wma *.avi etc...
0
 
LVL 3

Author Comment

by:Mister_Spock
ID: 20304364
Are there commas (,) in between each file type?
0
 
LVL 19

Accepted Solution

by:
darron_chapman earned 500 total points
ID: 20304373
No, they should just be space delimited.
1
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Closing Comment

by:Mister_Spock
ID: 31409681
Thank you
0
 

Expert Comment

by:rmassro
ID: 22599585
How do exclude system files? I rather not to /XF *.system files etc.?
0
 

Expert Comment

by:choccolade
ID: 26281190
@rmassro: /XA:S excludes files that have the system attribute set
0
 

Expert Comment

by:gbcalm
ID: 37801629
can you use an input file to put the excluded file list into  the way you could include options under xcopy? so instead of having to list each file type on the command line you could reference a file that contains all the file types to be excluded?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Math Equation 23 122
maven disable workspace resolution 1 37
backup program with robocopy 6 70
CSV file copy field 1 to field 2 2 35
A short article about a problem I had getting the GPS LocationListener working.
This is an explanation of a simple data model to help parse a JSON feed
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

762 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