jsturtz
asked on
using xcopy and \exclude
well i thought this was working but i just saw a bunch of files from 'system volume information' scrolling across my screen as they copied so i guess not. i saw a thread that seems to imply i need to use 8.3 style folder names but i saw a reference on the ms site saying it will use an absolute reference for a folder. altho i would like to use relative names so this will work on any drive.
i have a batch file that is copying my c: drive to another drive for temporary backup. i have created an exclude list of things to NOT copy. it seems the exclude is having problems. any ideas on what i am doing wrong? thanks. jim
*************************
bakc is in c:\bin so is xf.txt
bakc.bat -->> xcopy c:\* n:\NewFolderc\ /e /s /y /d /c /i /h /exclude:xf.txt
xf.txt (below)
zgpt*
\recycler
\windows
\winxp
\temp
"\system volume information"
"system volume information"
pagefile.sys
hyb*.sys
\wutemp\
\i386
i have a batch file that is copying my c: drive to another drive for temporary backup. i have created an exclude list of things to NOT copy. it seems the exclude is having problems. any ideas on what i am doing wrong? thanks. jim
*************************
bakc is in c:\bin so is xf.txt
bakc.bat -->> xcopy c:\* n:\NewFolderc\ /e /s /y /d /c /i /h /exclude:xf.txt
xf.txt (below)
zgpt*
\recycler
\windows
\winxp
\temp
"\system volume information"
"system volume information"
pagefile.sys
hyb*.sys
\wutemp\
\i386
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
mrwad99
i tried using "\system volume information\" twice, as opposed to CupawnTae's suggestion of \System Volume Information. the quotes marks interfere with the exclusion.
i again tried the /d option and confirmed my reasoning for it. w/o the /d the entire directory is copied over everytime one uses xcopy, with the /d then only changed stuff since last time get copied. that is the behavior i am looking for.
thanks to both of you for your replies.
give the points to CupawnTae
i tried using "\system volume information\" twice, as opposed to CupawnTae's suggestion of \System Volume Information. the quotes marks interfere with the exclusion.
i again tried the /d option and confirmed my reasoning for it. w/o the /d the entire directory is copied over everytime one uses xcopy, with the /d then only changed stuff since last time get copied. that is the behavior i am looking for.
thanks to both of you for your replies.
give the points to CupawnTae
You have the switches: /e /s
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Now, one or the other is best here, but not both :)
Also /D
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
I don't think you need this really.
>> "\system volume information"
Should be
"\system volume information\"
("/EXCLUDE:file1[+file2][+
Specifies a list of files containing strings. When any of the
strings match any part of the absolute path of the file to be
copied, that file will be excluded from being copied. For
example, specifying a string like \obj\ or .obj will exclude
all files underneath the directory obj or all files with the
.obj extension respectively."
Those changes should bring some improvement.
HTT