XCOPY COMMAND and EXCLUDE parameter

Status
Not open for further replies.
This is for the old timers that may have used the XCOPY command.

Here goes.

I have a file "BackupDataToExternalDrive.Bat". It contains one line

XCOPY c:\Billing\ G:\Billing /Exclude:\FilesToExclude.Txt /S/V/Y


The File "FilesToExclude.Txt" contains:

"c:\Billing\Metairie\Data\emailssent"
"c:\Billing\Metairie\Data\tpatcgs"
"c:\Billing\Metairie\Data\tpatient"
"c:\Billing\Metairie\Data\trackerr"
"c:\Billing\Metairie\Data\trackemail"
"c:\Billing\Metairie\Data\trish"


When I run "BackupDataToExternalDrive.Bat", I get the following error:

Can't read file "\FilesToExclude.Txt"


I have tried various combinations of the file name from full path to only the name. I am at a loss.

Any suggestions would be helpful.


Thanks in advance,

Paul
 
As you probably don't know, \ in front of a path means "start from the drive root". So if you specify \FilesToExclude.txt, it will look for it in C: (or whatever your current drive is). Try /exclude:FilesToExclude.Txt instead.
 
Status
Not open for further replies.
Back