Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista - Xcopy /D copies all files, not just newer

Reply
 
Old 07-26-2009   #1 (permalink)
Mike C


 
 

Xcopy /D copies all files, not just newer

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?

My System SpecsSystem Spec
Old 07-26-2009   #2 (permalink)
R. C. White


 
 

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

Hi, Mike.

In the Command Prompt window, type: xcopy /?

If you already did this, then what is the exact form of your command line?
Did you insert a date, such as:
xcopy /d:07-31-08

I don't use the /d switch much; does it require a 4-digit year? Are you
perhaps using the d-m-y format, rather than m-d-y? Or / instead of - for
the separators?

I'm about out of guesses. Could you supply more details? Some examples,
perhaps?

RC
--
R. C. White, CPA
San Marcos, TX
rc@xxxxxx
Microsoft Windows MVP
Windows Live Mail 2009 (14.0.8064.0206) in Win7 Ultimate x64 RC 7100

"Mike C" <michaeljc70@xxxxxx> wrote in message
news:1662249e-4fe3-419c-bdde-f674ae97b54e@xxxxxx
Quote:

> 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?
My System SpecsSystem Spec
Old 07-26-2009   #3 (permalink)
DaveD


 
 

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

The /d switch, without specifying a date, is supposed to overlay only older
files.
BTW - that format doesn't use a colon.

example extracted and simplified from my own backup command file, which
backs up my Data drive (M) to a USB drive:

XCOPY M:\* U:\Backups /d/e/c/i/r/k/o/y

***

"R. C. White" <rc@xxxxxx> wrote in message
news:eCfWE9iDKHA.3732@xxxxxx
Quote:

> Hi, Mike.
>
> In the Command Prompt window, type: xcopy /?
>
> If you already did this, then what is the exact form of your command line?
> Did you insert a date, such as:
> xcopy /d:07-31-08
>
> I don't use the /d switch much; does it require a 4-digit year? Are you
> perhaps using the d-m-y format, rather than m-d-y? Or / instead of - for
> the separators?
>
> I'm about out of guesses. Could you supply more details? Some examples,
> perhaps?
>
> RC
> --
> R. C. White, CPA
> San Marcos, TX
> rc@xxxxxx
> Microsoft Windows MVP
> Windows Live Mail 2009 (14.0.8064.0206) in Win7 Ultimate x64 RC 7100
>
> "Mike C" <michaeljc70@xxxxxx> wrote in message
> news:1662249e-4fe3-419c-bdde-f674ae97b54e@xxxxxx
Quote:

>> 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?
>
My System SpecsSystem Spec
Old 07-31-2009   #4 (permalink)
Eric


 
 

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


"Mike C" <michaeljc70@xxxxxx> wrote in message
news:b5d24d7e-86ab-40b5-a2a2-9ce319a96d97@xxxxxx
On Jul 28, 1:40 pm, "Eric" <some...@xxxxxx> wrote:
Quote:

>
Quote:
Quote:

> >>>>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?


My System SpecsSystem Spec
Old 07-31-2009   #5 (permalink)
Mike C


 
 

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

On Jul 31, 7:35*am, "Eric" <some...@xxxxxx> wrote:
Quote:

> "MikeC" <michaelj...@xxxxxx> wrote in message
>
> news:b5d24d7e-86ab-40b5-a2a2-9ce319a96d97@xxxxxx
> On Jul 28, 1:40 pm, "Eric" <some...@xxxxxx> wrote:
>
Quote:
Quote:

> > >>>>I am trying to use a batchfile to backup from a PC to a NAS. I am
>
Quote:

> > 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.
My System SpecsSystem Spec
Old 07-31-2009   #6 (permalink)
Eric


 
 

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


"Mike C" <michaeljc70@xxxxxx> wrote in message
news:da3c0e7a-2812-4b10-87b4-bb2f73c39ea7@xxxxxx
On Jul 31, 7:35 am, "Eric" <some...@xxxxxx> wrote:
Quote:

> "MikeC" <michaelj...@xxxxxx> wrote in message
>
> news:b5d24d7e-86ab-40b5-a2a2-9ce319a96d97@xxxxxx
> On Jul 28, 1:40 pm, "Eric" <some...@xxxxxx> wrote:
>
Quote:
Quote:

> > >>>>I am trying to use a batchfile to backup from a PC to a NAS. I am
>
Quote:

> > 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.


My System SpecsSystem Spec
Old 08-03-2009   #7 (permalink)
Mike C


 
 

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

On Jul 31, 2:40*pm, "Eric" <some...@xxxxxx> wrote:
Quote:

> "MikeC" <michaelj...@xxxxxx> wrote in message
>
> news:da3c0e7a-2812-4b10-87b4-bb2f73c39ea7@xxxxxx
> On Jul 31, 7:35 am, "Eric" <some...@xxxxxx> wrote:
>
Quote:

> > "MikeC" <michaelj...@xxxxxx> wrote in message
>
Quote:

> >news:b5d24d7e-86ab-40b5-a2a2-9ce319a96d97@xxxxxx
> > On Jul 28, 1:40 pm, "Eric" <some...@xxxxxx> wrote:
>
Quote:
Quote:

> > > >>>>I am trying to use a batchfile to backup from a PC to a NAS. I am
>
Quote:
Quote:

> > > 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.
>
Quote:

> > -
> > -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.
>
Quote:

> > 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,Xcopyand 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.
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?).
My System SpecsSystem Spec
Old 08-03-2009   #8 (permalink)
Eric


 
 

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


"Mike C" <michaeljc70@xxxxxx> wrote in message
news:9a87a1bb-7b3a-4f96-9ba9-101226a4c27d@xxxxxx

- 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?


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Robocopy copies same files again and again. General Discussion
I have 2 copies of my files; Delete one? Vista General
"Access is denied" for files with .exe or zip extensions using Xcopy or Robocopy Vista General
how to convert win help files to newer formats?! Vista General
xcopy in vista not copying the files Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

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