Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Re: Xcopy /D copies all files, not just newer

Reply
Thread Tools Display Modes

Re: Xcopy /D copies all files, not just newer

 
 
Rick Rogers
Guest
Posts: n/a

 
      07-26-2009
Hi,

Since xcopy is deprecated, try using robocopy:
http://technet.microsoft.com/en-us/l...45(WS.10).aspx

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP
http://mvp.support.microsoft.com/
Windows help - www.rickrogers.org
Vote for my shoe: http://rick-mvp.blogspot.com

"Mike C" <> wrote in message
news:1662249e-4fe3-419c-bdde-...
>I am trying to use a batchfile to backup from a PC to a NAS. I am
> using the /D switch, and the files are mostly months newer on the NAS,
> but it still wants to copy them all. Anyone know why or how to
> workaround this?


 
Reply With Quote
 
 
 
 
Gene E. Bloch
Guest
Posts: n/a

 
      07-28-2009
On Tue, 28 Jul 2009 08:18:58 -0700 (PDT), Mike C wrote:

> On Jul 26, 4:48*pm, "Rick Rogers" <r...@mvps.org> wrote:
>> Hi,
>>
>> Sincexcopyis deprecated, try using robocopy:http://technet.microsoft.com/en-us/l...45(WS.10).aspx
>>
>> --
>> Best of Luck,
>>
>> Rick Rogers, aka "Nutcase" - Microsoft MVPhttp://mvp.support.microsoft.com/
>> Windows help -www.rickrogers.org
>> Vote for my shoe:http://rick-mvp.blogspot.com
>>
>> "Mike C" <michaelj...@hotmail.com> wrote in message
>>
>> news:1662249e-4fe3-419c-bdde-...
>>
>>>I am trying to use a batchfile to backup from a PC to a NAS. *I am
>>> using the /Dswitch, and the files are mostly months newer on the NAS,
>>> but it still wants to copy them all. *Anyone know why or how to
>>> workaround this?

>
> Thanks. Using robocopy worked perfectly. I didn't realize xcopy was
> deprecated.


There's also something called xxcopy, which I guess is a competitor of
Robocopy.

Since I rarely or never use them, I'm no expert - just mentioning an
alternative for anyone who cares :-)

--
Gene E. Bloch letters0x40blochg0x2Ecom
 
Reply With Quote
 
Eric
Guest
Posts: n/a

 
      07-28-2009

"Gene E. Bloch" <not-> wrote in message
news:k5n1wv0ozv34$....
> On Tue, 28 Jul 2009 08:18:58 -0700 (PDT), Mike C wrote:
>
>> On Jul 26, 4:48 pm, "Rick Rogers" <r...@mvps.org> wrote:
>>> Hi,
>>>
>>> Sincexcopyis deprecated, try using
>>> robocopy:http://technet.microsoft.com/en-us/l...45(WS.10).aspx
>>>
>>> --
>>> Best of Luck,
>>>
>>> Rick Rogers, aka "Nutcase" - Microsoft
>>> MVPhttp://mvp.support.microsoft.com/
>>> Windows help -www.rickrogers.org
>>> Vote for my shoe:http://rick-mvp.blogspot.com
>>>
>>> "Mike C" <michaelj...@hotmail.com> wrote in message
>>>
>>> news:1662249e-4fe3-419c-bdde-...
>>>
>>>>I am trying to use a batchfile to backup from a PC to a NAS. I am
>>>> using the /Dswitch, and the files are mostly months newer on the NAS,
>>>> but it still wants to copy them all. Anyone know why or how to
>>>> workaround this?

>>
>> Thanks. Using robocopy worked perfectly. I didn't realize xcopy was
>> deprecated.

>
> There's also something called xxcopy, which I guess is a competitor of
> Robocopy.
>
> Since I rarely or never use them, I'm no expert - just mentioning an
> alternative for anyone who cares :-)
>
> --
> Gene E. Bloch letters0x40blochg0x2Ecom


There's always an alternative. If you're already writing a batch file you
could just write a VBscript file instead and use the file system objects.


 
Reply With Quote
 
Eric
Guest
Posts: n/a

 
      07-31-2009

"Mike C" <> wrote in message
news:b5d24d7e-86ab-40b5-a2a2-...
On Jul 28, 1:40 pm, "Eric" <some...@idontwantspam.com> wrote:
>
> >>>>I am trying to use a batchfile to backup from a PC to a NAS. I am

>
> There's always an alternative. If you're already writing a batch file you
> could just write a VBscript file instead and use the file system objects.

-
-I am a programmer, but have no idea why you would want to reinvent the
-wheel.
-
-XXCOPY I have used before, but like to use built-in commands/utilities
-if possible so that my batchfiles are portable without installing a
-lot of extra software.

OP already said they were writing a batch file, so I recommend vbscript.
What wheel is that reinventing? Does XXCOPY make batch files?
vbscript is native to Windows, no extra software to install.
Why use built in commands if the issue here is a built in command was
deprecated and needs a replacement?


 
Reply With Quote
 
Eric
Guest
Posts: n/a

 
      07-31-2009

"Mike C" <> wrote in message
news:da3c0e7a-2812-4b10-87b4-...
On Jul 31, 7:35 am, "Eric" <some...@idontwantspam.com> wrote:
> "MikeC" <michaelj...@hotmail.com> wrote in message
>
> news:b5d24d7e-86ab-40b5-a2a2-...
> On Jul 28, 1:40 pm, "Eric" <some...@idontwantspam.com> wrote:
>
> > >>>>I am trying to use a batchfile to backup from a PC to a NAS. I am

>
> > There's always an alternative. If you're already writing a batch file
> > you
> > could just write a VBscript file instead and use the file system
> > objects.

>
> -
> -I am a programmer, but have no idea why you would want to reinvent the
> -wheel.
> -
> -XXCOPY I have used before, but like to use built-in commands/utilities
> -if possible so that my batchfiles are portable without installing a
> -lot of extra software.
>
> OP already said they were writing a batch file, so I recommend vbscript.
> What wheel is that reinventing? Does XXCOPY make batch files?
> vbscript is native to Windows, no extra software to install.
> Why use built in commands if the issue here is a built in command was
> deprecated and needs a replacement?

-
-Well, Xcopy and Robocopy have around 50 switches. That can be written
-in vb script easily?
-
-When I said using in a batchfile, it is just a simple batch file with
-3 robocopy commands.

Why are your posts broken (when I reply it doesn't add the > in front)?

I don't know how easy it is to program for 50 switches. That depends on
your programming expertise and which switches you use. I don't normally use
any switches for robocopy.

If it's a simple batch file with 3 commands, your simplest option should be
replacing your xxcopy statements with robocopy statements, assuming the
machine it's going to run on will have the robocopy and you're not worried
about another utility becoming deprecated. I use robocopy on XP pro and it
didn't come with it. Your original post said batch file, didn't say simple
3 statement batch file. Converting a more complicated batch file to a
program could save some headaches later.


 
Reply With Quote
 
Eric
Guest
Posts: n/a

 
      08-03-2009

"Mike C" <> wrote in message
news:9a87a1bb-7b3a-4f96-9ba9-...

- I appreciate all the responses. I am guessing though that there is
- some simple reason why robocopy isn't working. I assume that a utility
- that Microsoft has included for 10 years works and there is just some
- caveat why it isn't working in my case (maybe because of NAS?).

Is robocopy copying files?
Did I read this right that your issue is robocopy not copying files which
haven't changed?
Did you check the switches? Did you try /IS?


 
Reply With Quote
 
Gene E. Bloch
Guest
Posts: n/a

 
      08-05-2009

On Fri, 31 Jul 2009 01:37:53 -0700 (PDT), Mike C wrote:

> On Jul 26, 4:48*pm, "Rick Rogers" <r...@mvps.org> wrote:
>> Hi,
>>
>> Sincexcopyis deprecated, try usingrobocopy:http://technet.microsoft.com/en-us/l...45(WS.10).aspx
>>
>> --
>> Best of Luck,
>>
>> Rick Rogers, aka "Nutcase" - Microsoft MVPhttp://mvp.support.microsoft.com/
>> Windows help -www.rickrogers.org
>> Vote for my shoe:http://rick-mvp.blogspot.com
>>
>> "MikeC" <michaelj...@hotmail.com> wrote in message
>>
>> news:1662249e-4fe3-419c-bdde-...
>>
>>>I am trying to use a batchfile to backup from a PC to a NAS. *I am
>>> using the /D switch, and the files are mostly months newer on the NAS,
>>> but it still wants to copy them all. *Anyone know why or how to
>>> workaround this?

>
> I take it back that Robocopy worked. Using the /XO switch to exclude
> older files, it still wants to copy files that have the exact
> timestamp on them. I verified this on several files and the
> timestamps are the same to the second. Oddly, it isn't on all files,
> but a lot of them.


I don't remember about Windows, but I recall that Unix file time stamps are
recorded to the millisecond. If this is true in NTFS, two files could seem
to have the same age while one is in fact older, when the display is only
to the second.

Now ask me whether I believe that is happening here...

--
Gene E. Bloch letters0x40blochg0x2Ecom
 
Reply With Quote
 
blank
Guest
Posts: n/a

 
      08-05-2009
"Gene E. Bloch" <not-> wrote in
news::

> On Fri, 31 Jul 2009 01:37:53 -0700 (PDT), Mike C wrote:
>
>> On Jul 26, 4:48*pm, "Rick Rogers" <r...@mvps.org> wrote:
>>> Hi,
>>>
>>> Sincexcopyis deprecated, try
>>> usingrobocopy:http://technet.microsoft.com/en-us/library/cc733145(WS.
>>> 10).aspx
>>>
>>> --
>>> Best of Luck,
>>>
>>> Rick Rogers, aka "Nutcase" - Microsoft
>>> MVPhttp://mvp.support.microsoft.com/ Windows help
>>> -www.rickrogers.org Vote for my shoe:http://rick-mvp.blogspot.com
>>>
>>> "MikeC" <michaelj...@hotmail.com> wrote in message
>>>
>>> news:1662249e-4fe3-419c-bdde-
>>> m...
>>>
>>>>I am trying to use a batchfile to backup from a PC to a NAS. *I am
>>>> using the /D switch, and the files are mostly months newer on the
>>>> NAS, but it still wants to copy them all. *Anyone know why or how
>>>> to workaround this?

>>
>> I take it back that Robocopy worked. Using the /XO switch to exclude
>> older files, it still wants to copy files that have the exact
>> timestamp on them. I verified this on several files and the
>> timestamps are the same to the second. Oddly, it isn't on all files,
>> but a lot of them.

>
> I don't remember about Windows, but I recall that Unix file time
> stamps are recorded to the millisecond. If this is true in NTFS, two
> files could seem to have the same age while one is in fact older, when
> the display is only to the second.
>
> Now ask me whether I believe that is happening here...
>


This can happen when copying between drives where one is formatted in
NTFS and the other is FAT - the time is stored to different resolutions,
and may also be stored with differing timezones (DST vs standard time, or
UCT vs local time).
 
Reply With Quote
 
Guest
Posts: n/a

 
      08-05-2009
File Times
A file time is a 64-bit value that represents the number of 100-nanosecond
intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated
Universal Time (UTC). The system records file times when applications
create, access, and write to files.

The NTFS file system stores time values in UTC format, so they are not
affected by changes in time zone or daylight saving time. The FAT file
system stores time values based on the local time of the computer. For
example, a file that is saved at 3:00pm PST in Washington is seen as 6:00pm
EST in New York on an NTFS volume, but it is seen as 3:00pm EST in New York
on a FAT volume.

Timestamps are updated at various times and for various reasons. The only
guarantee about a file timestamp is that the file time is correctly
reflected when the handle that makes the change is closed.

Not all file systems can record creation and last access times, and not all
file systems record them in the same manner. For example, the resolution of
create time on FAT is 10 milliseconds, while write time has a resolution of
2 seconds and access time has a resolution of 1 day, so it is really the
access date. The NTFS file system delays updates to the last access time for
a file by up to 1 hour after the last access.



--
..
--
"Gene E. Bloch" <not-> wrote in message
news:...
> On Fri, 31 Jul 2009 01:37:53 -0700 (PDT), Mike C wrote:
>
>> On Jul 26, 4:48 pm, "Rick Rogers" <r...@mvps.org> wrote:
>>> Hi,
>>>
>>> Sincexcopyis deprecated, try
>>> usingrobocopy:http://technet.microsoft.com/en-us/l...45(WS.10).aspx
>>>
>>> --
>>> Best of Luck,
>>>
>>> Rick Rogers, aka "Nutcase" - Microsoft
>>> MVPhttp://mvp.support.microsoft.com/
>>> Windows help -www.rickrogers.org
>>> Vote for my shoe:http://rick-mvp.blogspot.com
>>>
>>> "MikeC" <michaelj...@hotmail.com> wrote in message
>>>
>>> news:1662249e-4fe3-419c-bdde-...
>>>
>>>>I am trying to use a batchfile to backup from a PC to a NAS. I am
>>>> using the /D switch, and the files are mostly months newer on the NAS,
>>>> but it still wants to copy them all. Anyone know why or how to
>>>> workaround this?

>>
>> I take it back that Robocopy worked. Using the /XO switch to exclude
>> older files, it still wants to copy files that have the exact
>> timestamp on them. I verified this on several files and the
>> timestamps are the same to the second. Oddly, it isn't on all files,
>> but a lot of them.

>
> I don't remember about Windows, but I recall that Unix file time stamps
> are
> recorded to the millisecond. If this is true in NTFS, two files could seem
> to have the same age while one is in fact older, when the display is only
> to the second.
>
> Now ask me whether I believe that is happening here...
>
> --
> Gene E. Bloch letters0x40blochg0x2Ecom


 
Reply With Quote
 
Gene E. Bloch
Guest
Posts: n/a

 
      08-05-2009
On Wed, 5 Aug 2009 10:56:46 +1000, . wrote:

> File Times
> A file time is a 64-bit value that represents the number of 100-nanosecond
> intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated
> Universal Time (UTC). The system records file times when applications
> create, access, and write to files.
>
> The NTFS file system stores time values in UTC format, so they are not
> affected by changes in time zone or daylight saving time. The FAT file
> system stores time values based on the local time of the computer. For
> example, a file that is saved at 3:00pm PST in Washington is seen as 6:00pm
> EST in New York on an NTFS volume, but it is seen as 3:00pm EST in New York
> on a FAT volume.
>
> Timestamps are updated at various times and for various reasons. The only
> guarantee about a file timestamp is that the file time is correctly
> reflected when the handle that makes the change is closed.
>
> Not all file systems can record creation and last access times, and not all
> file systems record them in the same manner. For example, the resolution of
> create time on FAT is 10 milliseconds, while write time has a resolution of
> 2 seconds and access time has a resolution of 1 day, so it is really the
> access date. The NTFS file system delays updates to the last access time for
> a file by up to 1 hour after the last access.


Thanks, <dot> and < >.

Looks like my guess might have actually been right (not in detail, but in
outline).

And I was just kidding about the new forms of your names - no offense was
intended.

--
Gene E. Bloch letters0x40blochg0x2Ecom
 
Reply With Quote
 
 
 
Reply

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 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 M4a Files Mark Windows Media Player 7 09-18-2009 08:46 PM
Re: Xcopy /D copies all files, not just newer R. C. White Windows Vista General Discussion 1 07-26-2009 09:19 PM
media player not showing any files willisjack Windows Media Player 0 07-26-2009 09:14 PM
Re: Trying to view flv files VanguardLH Internet Explorer 0 07-26-2009 05:01 PM
VHD Files Bigbruiser Windows Vista General Discussion 3 07-24-2009 02:02 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59