? on .bat with exclude

W

william ewald

Good day,
I am having an issue creating a backup.bat file that has an exclude
statement. What I am trying to do is to backup the My Documents folder
off of C: while excluding the Music directory (to save space). The
backed up files are copied to the mapped H: drive. If anyone can see
where I have gone wrong please let me know. Thank you!!!

Echo
SET ExclPath="C:\Documents and Settings\%username%\My
Documents\Exclude\exclude.txt"
XCOPY "C:\My Documents" /e /s /y H:/EXCLUDE: "C:\Documents and
Settings\%username%\My Documents\Exclude\exclude.txt"

Errors =
Invalid number of parameters
 
R

rowe_newsgroups

Good day,
I am having an issue creating a backup.bat file that has an exclude
statement. What I am trying to do is to backup the My Documents folder
off of C: while excluding the Music directory (to save space). The
backed up files are copied to the mapped H: drive. If anyone can see
where I have gone wrong please let me know. Thank you!!!

Echo
SET ExclPath="C:\Documents and Settings\%username%\My
Documents\Exclude\exclude.txt"
XCOPY "C:\My Documents" /e /s /y H:/EXCLUDE: "C:\Documents and
Settings\%username%\My Documents\Exclude\exclude.txt"

Errors =
Invalid number of parameters

*** Sent via Developersdexhttp://www.developersdex.com***


Well your first mistake is that you posted a vbscript question to the
Visual Basic .Net newsgroup.

Thanks,

Seth Rowe
 
M

Michel Posseth [MCP]

VBscript ????? huh ...... :)

i call this just DOS commands , or command parameters , or Batching but
VBscript .... no

It stays O.T. for this group but however as i just one to beat myself on
the chest again for knowing the answer for this question
here it is :)

This should work


xcopy "C:\Documents and Settings\Bla\My Documents" "H:\Backup\Michel" /I /E
/Y /C /V /R /Z /K /H /exclude:C:\Backupexclude\excludeList.txt

in the excludeList.txt

\My Documents\Music\
\My Documents\Movies\
\My Documents\Rubish\


Regards

Michel Posseth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top