Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 29209
  • Last Modified:

Excluding files with Robocopy

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
Mister_Spock
Asked:
Mister_Spock
1 Solution
 
darron_chapmanCommented:
robocopy [source directory] [destination directory] /S /XF *.mp3 *.wma *.avi etc...
0
 
Mister_SpockAuthor Commented:
Are there commas (,) in between each file type?
0
 
darron_chapmanCommented:
No, they should just be space delimited.
1
Technology Partners: 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!

 
Mister_SpockAuthor Commented:
Thank you
0
 
rmassroCommented:
How do exclude system files? I rather not to /XF *.system files etc.?
0
 
choccoladeCommented:
@rmassro: /XA:S excludes files that have the system attribute set
0
 
gbcalmCommented:
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 Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now