Re: Using xcopy for backup



Bob I wrote:

Stan Weiss wrote:
"Pegasus (MVP)" wrote:

"Stubby" <William.Plummer-NOSPAM-@xxxxxxxxxxxx> wrote in message
news:AaGdnTYjkt-yN_bYnZ2dnUVZ_sOdnZ2d@xxxxxxxxxxxxxx


Pegasus (MVP) wrote:

"Don Culp" <dculp@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%232Q4vqoEHHA.4404@xxxxxxxxxxxxxxxxxxxxxxx

I'm trying to use xcopy from a batch file to back up drive d to drive j
(both local drives). The command is:

xcopy d:\*.* j:\backup\*.* /s /h /e /v /d

However, this gives an error message:

Can't read file: "\System Volume Information"

and aborts without copying anything. ("System Volume Information" is a
folder in the root folder of d. The Security for this folder is set to

allow

reading it.)

I attempted to exclude "\System Volume Information" during xcopy with

the

following command but still get the same results:

xcopy d:\*.* j:\backup\*.* /s /h /e /v /d /exclude:"\System

Volume

Information"

I realize that I could put everything that I want to backup on d: into

a

single folder and then backup only that folder but I would prefer not

to

do

this. Also, the batch file has commands to backup other parts of my

system

(in addition to drive d:) so I'd prefer not to abandon this batch file.

Thanks for any suggestions.

Don Culp



I recommend you keep things simple: Instead of excluding certain
folders, just tell xcopy to continue, regardless of errors. If you don't
then xcopy might get stuck with other issues, e.g. locked files. Note
the switches I added, and note that the destination should NOT
have any wildcard characters.

xcopy d:\*.* j:\backup\ /s /h /e /v /d /y /c


Should /m be used so files don't get backed up again unless modified?


The /m switch is appropriate if you're backing up to a different target
folder each time.

Since you're backing up to the same target folder, you should use the /d
switch.



What does the /d do? I have only ever used /d:date.
Stan

Leaving the date blank only copies newer, please enter XCOPY /? on
command line to see explanation.

Thanks, that is good to know.
Stan
.



Relevant Pages

  • Re: How to copy whole folders?
    ... First of all your syntax is different than xcopy help shows: ... I want just to move my batch file from one folder to another and run it ... error and restart the same xcopy command until all files are copied. ...
    (microsoft.public.windows.file_system)
  • Re: How to copy whole folders?
    ... and the destination folder to have the same name as a source folder ... I do not want xcopy to supress the error. ... and restart the same xcopy command until all files are copied. ... Windows continue copying files but not quitting copying process as it is ...
    (microsoft.public.windows.file_system)
  • Re: How to copy whole folders?
    ... local folder as a source ... I do not want xcopy to supress the error. ... and restart the same xcopy command until all files are copied. ... Windows continue copying files but not quitting copying process as it is ...
    (microsoft.public.windows.file_system)
  • Re: cannot use xcopy
    ... "read" access by issuing these commands from the Command ... Thank you for the advise but I want the xcopy to be able through users ... and I get the"cannot create folder - file" from the xcopy... ... Use a scheduled task to move the files from the holding ...
    (microsoft.public.win2000.general)
  • Re: Active X Controls show as "2" files in Downloaded Program Fold
    ... Program Files", otherwise that error message will appear. ... If you deleted and recreated the folder, then you will need to follow the ... at a command prompt for the full set of options] ...
    (microsoft.public.windowsxp.general)

Loading