TechSpot

XCOPY COMMAND and EXCLUDE parameter

By paulhenrydanna
Sep 18, 2007
  1. 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
     
  2. Nodsu

    Nodsu TS Rookie Posts: 9,431

    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.
     
  3. 1bellb

    1bellb TS Enthusiast Posts: 107

Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.