Computing.Net > Forums > Programming > Batch file /Exclude rule??

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file /Exclude rule??

Reply to Message Icon

Name: Dan
Date: September 23, 2002 at 09:16:03 Pacific
OS: Win XP SP1
CPU/Ram: PIII/256
Comment:

HELP! I'm writing a batch file that's supposed to copy files off of networked servers to a backup server. My batch file looks like this:

xcopy "f:\test tree\*.*" "c:\test dir" /v /e /y /EXCLUDE:"C:\Documents and Settings\dfelten\Desktop\excluderule.txt"
pause

(The pause is so that I can see any error messages)

My exclude rule looks like this:

"\Test subobject 3b"

I've tried it with and without the quotes. The error message I get is this:

'Can't read file "C:\Documents and Settings\dfelten\Desktop\excluderule.txt"'

I'm wondering if I have a syntax error....any help will be greatly appreciated!



Sponsored Link
Ads by Google

Response Number 1
Name: M
Date: September 24, 2002 at 18:26:37 Pacific
Reply:

It looks like xcopy doesn't handle blanks in exclude list file name.

If you put exclude list in file name like c:\temp\exclude it seems to work OK.



0
Reply to Message Icon

Related Posts

See More


Vertical Retrace with VB Excel VBA - batch file in...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file /Exclude rule??

Find and Replace text in Batch File www.computing.net/answers/programming/find-and-replace-text-in-batch-file/12413.html

Batch File deleting files by date? www.computing.net/answers/programming/batch-file-deleting-files-by-date/13717.html

editing text file with batch file www.computing.net/answers/programming/editing-text-file-with-batch-file/15231.html