also @ TechSpot: Building a Thin Mini-ITX PC: Small and Silent Performance

XCOPY COMMAND and EXCLUDE parameter

Discussion in 'Software Apps' started by paulhenrydanna, Sep 18, 2007.

  1. paulhenrydanna Newcomer, in training

    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 Newcomer, in training 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 Newcomer, in training Posts: 107