MS OS - Microsoft Forum to Usenet Gateway Header Right
Navbar Left Navbar Right


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,



Reply
Old 07-17-2007, 01:19 PM   #1
Jack Gillis
Guest
 
Posts: n/a
Default Xcopy help please

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.



 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-17-2007, 01:56 PM   #2
Pegasus \(MVP\)
Guest
 
Posts: n/a
Default 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).


 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-17-2007, 03:21 PM   #3
Jack Gillis
Guest
 
Posts: n/a
Default 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.


 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-17-2007, 03:23 PM   #4
Pegasus \(MVP\)
Guest
 
Posts: n/a
Default 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.


 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT -5. The time now is 12:58 PM.


Powered by vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Skin designed by CompletevB
Copyright © 2005-2008 Robert Schwarz, Sr. - All rights reserved - MS OS is an independent web site and is not affiliated with Microsoft Corporation.