Solved

Excluding files with Robocopy

Posted on 2007-11-16
7
23,742 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
A short article about a problem I had getting the GPS LocationListener working.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

757 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

21 Experts available now in Live!

Get 1:1 Help Now