jstevens wrote:John Gray wrote:I've no idea why you want each individual parameter on a new line
I have a long list of file types to include and I thought it would be easier to list them down then across.
If so, the best place to put them is at the left-hand-side of each line!
jstevens wrote:On a similar note, is it possible to exclude certain folders and subfolders such as "C:Windows"?
Example: Excluded C:\Windows but includes subfolders
/XD C:\Windows
Unless you can prove otherwise,
/XD c:\something includes all the subdirectories of c:\something, as well as itself.
Here's part of a BATch file I use to copy from one external hard drive (containing backups of a data drive, not C:\) to another:
Code: Select all
:: create the name of the log file from today's date (whose format is dd/mm/yyyy, UK only)
set log=%~dpn0_%date:~6,4%%date:~3,2%%date:~0,2%.txt
set source=E:\
set target=F:\
set parms=/copyall /s /np /r:0 /w:0 /fft /nfl /ndl
set parms=%parms% /xd Recycler "System Volume Information"
set parms=%parms% /xd "Local Data" "Kaspersky Lab"
set parms=%parms% /xd cache bases recent prefetch datacoll
set parms=%parms% /xf hiberfil.sys pagefile.sys
robocopy %source% %target% %parms% >> %log%