Batch- XCopy Help

To be filled by o.e.m. / To be filled by o.e.m.
January 29, 2011 at 08:20:15
Specs: Windows XP, 2.998 GHz / 3454 MB

set PATH ="E:\"
XCOPY "%CD%\folder" %PATH% /e/c/i/r/y/EXCLUDE:"%CD%\Exclude.txt"

Contents of Exclude.txt:

I run the batch file, and it displays: Invalid number of parameters

I've tried putting spaces in between each extension, (/E /C /I),
I've rearranged their positions, I've tried multiple other things...

I just know I'm looking over some giant, obvious mistake in the code.

See More: Batch- XCopy Help

Report •

January 29, 2011 at 08:39:06
Path is a system variable, don't mess with it. Ever. Add an underscore and you should be fine. Also, "SET PATH ="E:\"" is setting "PATH ", not "PATH". Notice the space

set PATH_="E:\"
XCOPY "%CD%\folder" %PATH_% /e/c/i/r/y/EXCLUDE:"%CD%\Exclude.txt"

Are you wishing to actually exclude "exclude.txt", or what's written inside of the text file, "*.svn"?

Can I put a question here?

Report •

January 29, 2011 at 23:36:06
An inquiring mind might wonder what %CD% is doing in there.

Life is too important to be taken seriously.


Report •

Related Solutions

Ask Question