»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 08-21-2003, 08:09 AM   #1 (permalink)
Registered User
 
Join Date: Oct 2002
Posts: 136
n3uxf is on a distinguished road
Xcopy -- Try 2

I'll try this again, since it looks like the message didn't post right the first time.

I am trying to write a simple script using the xcopy command. I need to use the /EXCLUDE switch, but am not having luck in getting it to work. I need to exclude the following:

E:\fnsw\dev\1\cache*
E:\fnsw\dev\1\TRANSIENT_*

If anyone can help me with the command syntax for this, I'd appreciate it.

Thanks.

n3uxf is offline   Reply With Quote
Old 08-21-2003, 08:47 AM   #2 (permalink)
Registered User
 
jmichna's Avatar
 
Join Date: Oct 2001
Location: Chicagoland IL
Posts: 1,539
jmichna is on a distinguished road
try the following:

xcopy /exclude:\fnsw\dev\1\cache
xcopy /exclude:\fnsw\dev\1\TRANSIENT_

Don't think you need the wildcard, also think the "E:" isn't needed since the remainder should be sufficient of a string to exclude the files you want excluded.

Please post back and ley me know what works.
__________________
A man becomes rich not by having what he wants, but by wanting what he haves.
jmichna is offline   Reply With Quote
Old 08-21-2003, 09:01 AM   #3 (permalink)
Registered User
 
Join Date: Oct 2002
Posts: 136
n3uxf is on a distinguished road
When I try that, I get the following error:

Can't read file: \fnsw\dev\1\cache
n3uxf is offline   Reply With Quote
Old 08-21-2003, 09:28 AM   #4 (permalink)
Registered User
 
Steve R Jones's Avatar
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 1,151
Steve R Jones is on a distinguished road
/EXCLUDE:file1[+file2][+file3]...

Specifies a list of files containing strings. Each string
should be in a separate line in the files. 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.
Steve R Jones is offline   Reply With Quote
Old 08-21-2003, 09:56 AM   #5 (permalink)
Registered User
 
jmichna's Avatar
 
Join Date: Oct 2001
Location: Chicagoland IL
Posts: 1,539
jmichna is on a distinguished road
Quote:
Originally posted by n3uxf
When I try that, I get the following error:

Can't read file: \fnsw\dev\1\cache
Try:
xcopy /exclude:E:\fnsw\dev\1\cache+E:\fnsw\dev\1\TRANSIEN T_

If still nogo, then try:
xcopy /exclude:"E:\fnsw\dev\1\cache"+"E:\fnsw\dev\1\TRANS IENT_" (putting each filename in quotes)


PS: Steve, I read that XCOPY help info too, and had some trouble trying to decipher whether the drive letter "E:" should be excluded. Seems like the * wildcard should not be needed.

I suggested separate lines for each file string just to keep things simple until n3uxf got something that worked.
__________________
A man becomes rich not by having what he wants, but by wanting what he haves.

Last edited by jmichna; 08-21-2003 at 10:00 AM.
jmichna is offline   Reply With Quote
Old 08-22-2003, 06:10 AM   #6 (permalink)
Registered User
 
Join Date: Oct 2002
Posts: 136
n3uxf is on a distinguished road
This is driving me nuts. I tried the path in quotes, still got the same error. It is something in the exclude switch. I am at a loss as to what else to try at this point.
n3uxf is offline   Reply With Quote
Old 08-22-2003, 07:52 AM   #7 (permalink)
Registered User
 
meese's Avatar
 
Join Date: Jun 2003
Location: NJ
Posts: 1,096
meese is on a distinguished road
The /EXCLUDE switch does not appear to be an option in the newer windows version of XCOPY. It was available in the DOS version. Some switches were added and some were removed when MS created the windows XCOPY.

http://support.microsoft.com/default...NoWebContent=1
meese is offline   Reply With Quote
Old 08-22-2003, 07:58 AM   #8 (permalink)
Registered User
 
Join Date: Oct 2002
Posts: 136
n3uxf is on a distinguished road
I am attempting this on a W2K box. If you do an xcopy /? at the command prompt, /EXCLUDE is listed as an option. If this is not an option, then is there another way of accomplishing exclusion of certain files?
n3uxf is offline   Reply With Quote
Old 08-26-2003, 05:42 PM   #9 (permalink)
Registered User
 
meese's Avatar
 
Join Date: Jun 2003
Location: NJ
Posts: 1,096
meese is on a distinguished road
Sorry for the delayed reply. Here is a link to MS kB about xcopy. Maybe something is there. I use xcopy to backup my data. I use the date switch. You would think there would be a way to omit certain files and folders. If you happen to find some info about this, I would appreciate it if you would post it here.

http://support.microsoft.com/search/...false&numDays=

Thats what call a hyper-extensive hyperlink... or one might say hyper-active. Hope it works

For some reason you any see the basic hyperlink. It appears they hide all the hyper activity.
meese is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 12:16 AM.