Jump to content

Xcopy help please


Recommended Posts

Guest Jack Gillis
Posted

I have an old fashioned batch file I use very often under XP to do a backup

of My

Documents to a USB Flash Drive.

 

It contains, among other things, this statement and works just fine and has

so for years.

 

xcopy "d:\My Documents\*.*" "U:\My Documents\" /D /Y /s

 

I have added many MP3 files to My Music and there is not room for them on

the USB Drive. Have tried to use the /EXCLUDE parameter tacked on to the

end of the statement but cannot get it to work. I keep getting 'parse' error

or 'Cannot find the files I a trying to exclude.

 

Will someone help me exclude My Documents\My Music from the copying, please?

 

Thank you.

  • Replies 3
  • Created
  • Last Reply

Popular Days

Guest Pegasus \(MVP\)
Posted

Re: Xcopy help please

 

 

"Jack Gillis" <XXXXXXXX@widomaker.com> wrote in message

news:ulV4laJyHHA.5204@TK2MSFTNGP03.phx.gbl...

>I have an old fashioned batch file I use very often under XP to do a backup

>of My

> Documents to a USB Flash Drive.

>

> It contains, among other things, this statement and works just fine and

> has

> so for years.

>

> xcopy "d:\My Documents\*.*" "U:\My Documents\" /D /Y /s

>

> I have added many MP3 files to My Music and there is not room for them on

> the USB Drive. Have tried to use the /EXCLUDE parameter tacked on to the

> end of the statement but cannot get it to work. I keep getting 'parse'

> error

> or 'Cannot find the files I a trying to exclude.

>

> Will someone help me exclude My Documents\My Music from the copying,

> please?

>

> Thank you.

>

>

>

Try this:

 

xcopy /D /Y /s /c "d:\My Documents\*.*" "U:\My Documents\"

/exclude:c:\Exclude.txt

 

The file c:\Exclude.txt must contain the string .MP3 (and perhaps

others too).

Guest Jack Gillis
Posted

Re: Xcopy help please

 

 

"Pegasus (MVP)" <I.can@fly.com> wrote in message

news:%23uH5GvJyHHA.1456@TK2MSFTNGP05.phx.gbl...

>

> "Jack Gillis" <XXXXXXXX@widomaker.com> wrote in message

> news:ulV4laJyHHA.5204@TK2MSFTNGP03.phx.gbl...

>>I have an old fashioned batch file I use very often under XP to do a

>>backup of My

>> Documents to a USB Flash Drive.

>>

>> It contains, among other things, this statement and works just fine and

>> has

>> so for years.

>>

>> xcopy "d:\My Documents\*.*" "U:\My Documents\" /D /Y /s

>>

>> I have added many MP3 files to My Music and there is not room for them on

>> the USB Drive. Have tried to use the /EXCLUDE parameter tacked on to the

>> end of the statement but cannot get it to work. I keep getting 'parse'

>> error

>> or 'Cannot find the files I a trying to exclude.

>>

>> Will someone help me exclude My Documents\My Music from the copying,

>> please?

>>

>> Thank you.

>>

>>

>>

> Try this:

>

> xcopy /D /Y /s /c "d:\My Documents\*.*" "U:\My Documents\"

> /exclude:c:\Exclude.txt

>

> The file c:\Exclude.txt must contain the string .MP3 (and perhaps

> others too).

>

 

Thank you very much. I didn't realize the argument for the /EXCLUDE

parameter was supposed to be a file name. I misread the Xcopy /? on that

point.

Guest Pegasus \(MVP\)
Posted

Re: Xcopy help please

 

 

"Jack Gillis" <XXXXXXXX@widomaker.com> wrote in message

news:efjTieKyHHA.3588@TK2MSFTNGP06.phx.gbl...

>

> "Pegasus (MVP)" <I.can@fly.com> wrote in message

> news:%23uH5GvJyHHA.1456@TK2MSFTNGP05.phx.gbl...

>>

>> "Jack Gillis" <XXXXXXXX@widomaker.com> wrote in message

>> news:ulV4laJyHHA.5204@TK2MSFTNGP03.phx.gbl...

>>>I have an old fashioned batch file I use very often under XP to do a

>>>backup of My

>>> Documents to a USB Flash Drive.

>>>

>>> It contains, among other things, this statement and works just fine and

>>> has

>>> so for years.

>>>

>>> xcopy "d:\My Documents\*.*" "U:\My Documents\" /D /Y /s

>>>

>>> I have added many MP3 files to My Music and there is not room for them

>>> on

>>> the USB Drive. Have tried to use the /EXCLUDE parameter tacked on to

>>> the

>>> end of the statement but cannot get it to work. I keep getting 'parse'

>>> error

>>> or 'Cannot find the files I a trying to exclude.

>>>

>>> Will someone help me exclude My Documents\My Music from the copying,

>>> please?

>>>

>>> Thank you.

>>>

>>>

>>>

>> Try this:

>>

>> xcopy /D /Y /s /c "d:\My Documents\*.*" "U:\My Documents\"

>> /exclude:c:\Exclude.txt

>>

>> The file c:\Exclude.txt must contain the string .MP3 (and perhaps

>> others too).

>>

>

> Thank you very much. I didn't realize the argument for the /EXCLUDE

> parameter was supposed to be a file name. I misread the Xcopy /? on that

> point.

>

 

I didn't either until I tried it myself. Thanks for the feedback.


×
×
  • Create New...