Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > xcopy help

Reply
Thread Tools

xcopy help

 
 
C
Guest
Posts: n/a
 
      12-01-2003

I've got a simple batch file which I use to backup my files from one
hard drive to another.

I'm using the /y switch to suppress the prompt when I'm overwriting an
existing file.

This seems rather wasteful and inefficient - why copy the same file
over itself?

Is there a way to make it so if the file exists then it won't copy the
file?


 
Reply With Quote
 
 
 
 
Ron McNulty
Guest
Posts: n/a
 
      12-01-2003
>>why copy the same file over itself?

The problem is how to decide the file is "the same file". Either may have
been modified (say just a few bytes changed), or they could be identical
data-wise yet have different time stamps or attributes. XCopy takes the easy
way out and copies it anyway.

Regards

Ron


 
Reply With Quote
 
 
 
 
Peter Huebner
Guest
Posts: n/a
 
      12-01-2003
In article <(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed)
says...
>
> I've got a simple batch file which I use to backup my files from one
> hard drive to another.
>
> I'm using the /y switch to suppress the prompt when I'm overwriting an
> existing file.
>
> This seems rather wasteful and inefficient - why copy the same file
> over itself?
>
> Is there a way to make it so if the file exists then it won't copy the
> file?



I can't remember if xcopy has an update switch off the bat, but pkzip
certainly has. If you want speed, use PKZIP, set compression to zero,
and set the update flag ...

xcopy /? yields the /m switch - this turns the archive flag of the file
off when it is copied and only copies files with the bit set: that
should do the trick -- provided your applications reset the archive bit
when a file has been altered and is being saved back.

h.t.h. -Peter
 
Reply With Quote
 
MarkH
Guest
Posts: n/a
 
      12-01-2003
(E-Mail Removed) (C) wrote in news:(E-Mail Removed):

>
> I've got a simple batch file which I use to backup my files from one
> hard drive to another.
>
> I'm using the /y switch to suppress the prompt when I'm overwriting an
> existing file.
>
> This seems rather wasteful and inefficient - why copy the same file
> over itself?
>
> Is there a way to make it so if the file exists then it won't copy the
> file?


Which operating system?

If you type: XCOPY /? Do you get this option:

/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.


This is what I get from the xcopy in WinXP.


--
Mark Heyes (New Zealand)
See my pics at http://homepages.ihug.co.nz/~markh/
"There are 10 types of people, those that
understand binary and those that don't"

 
Reply With Quote
 
John
Guest
Posts: n/a
 
      12-01-2003
On Mon, 1 Dec 2003 21:14:14 +0000 (UTC), MarkH <(E-Mail Removed)>
wrote:
get a copy of Robocopy, Xcopy on steriods...
It use to be on the NT resource kit....
>This is what I get from the xcopy in WinXP.


 
Reply With Quote
 
Shannon
Guest
Posts: n/a
 
      12-02-2003
On Mon, 01 Dec 2003 07:34:17 GMT, (E-Mail Removed) (C) wrote:

>
>I've got a simple batch file which I use to backup my files from one
>hard drive to another.
>
>I'm using the /y switch to suppress the prompt when I'm overwriting an
>existing file.
>
>This seems rather wasteful and inefficient - why copy the same file
>over itself?
>
>Is there a way to make it so if the file exists then it won't copy the
>file?
>



If you're on WIndows NT, 2000 or above, look for a tool called
"Robocopy" from Microsoft. It copyies only files with different
dates and times, and can even delete files from the target that no
longer exist in the source.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with xcopy iROK Computer Support 21 01-17-2008 02:39 PM
xcopy help Tanel Kagan Computer Support 2 12-12-2007 11:01 PM
Xcopy help please Jack Gillis Computer Support 10 07-18-2007 07:29 PM
Dos 6.22 XCopy command is not working properly =?Utf-8?B?V2FsdGVyIEx1YmVsbA==?= Microsoft Certification 0 12-30-2003 08:11 PM
HELP!! Simple xcopy from XP pro to Win 2003 failing.. Mark ASP .Net Security 1 12-01-2003 11:40 AM



Advertisments