Solved

Excluding files with Robocopy

Posted on 2007-11-16
7
24,286 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSumClump challenge 9 103
topping1 challenge 7 74
autoit - check if option is checked in another program 2 111
Microsoft C++ code failing in executable that worked 9 86
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
A short article about problems I had with the new location API and permissions in Marshmallow
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…
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…

863 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

20 Experts available now in Live!

Get 1:1 Help Now