Solved

Excluding files with Robocopy

Posted on 2007-11-16
7
25,319 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
A short article about a problem I had getting the GPS LocationListener working.
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…

840 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