How do I copy new files and modified files having new time/date?
I would like to copy all files having a specified extension from a set of
source directories to a set of target directories having the same names as
the source directories, where the transferred files don't already exist with
the same name and time/date in the corresponding target directory. If a
file does exist in the same named target directory having the same name as
the file in the source directory along with the same time/date then the
transfer is aborted. If a file exists with the same name but a different
time/date, then the preexisting file in the target directory should be
overwritten, with the time/date of the file in the target directory being
replaced by that of the transferred file.
Re: How do I copy new files and modified files having new time/date?
"Don J" <dej8801@comcast.net> wrote in message
news:GdKdne-Ic7of67zbnZ2dnUVZ_r2onZ2d@comcast.com...
> I would like to copy all files having a specified extension from a set of
> source directories to a set of target directories having the same names as
> the source directories, where the transferred files don't already exist
with
> the same name and time/date in the corresponding target directory. If a
> file does exist in the same named target directory having the same name as
> the file in the source directory along with the same time/date then the
> transfer is aborted. If a file exists with the same name but a different
> time/date, then the preexisting file in the target directory should be
> overwritten, with the time/date of the file in the target directory being
> replaced by that of the transferred file.
>
> Don J
>
> --------------------------------------------------------------------------
--------
You write "If a file exists with the same name but a ***different***
time/date, then the preexisting file in the target directory should be
overwritten, with the time/date of the file in the target directory being
replaced by that of the transferred file."
I don't think you mean what you write. You probably mean this:
"If a file exists with the same name but an ***older*** time/date,
then the preexisting file in the target directory should be overwritten,
with the time/date of the file in the target directory being replaced
by that of the transferred file."
The short answer is: Put an appropriate xcopy.exe command into
a batch file and use the /d switch.
Re: How do I copy new files and modified files having new time/date?
"Pegasus \(MVP\)" <I.can@fly.com> wrote in
news:uT19NKwfHHA.4636@TK2MSFTNGP03.phx.gbl:
> "Don J" <dej8801@comcast.net> wrote in message
> news:GdKdne-Ic7of67zbnZ2dnUVZ_r2onZ2d@comcast.com...
>> I would like to copy all files having a specified extension from a
>> set of source directories to a set of target directories having the
>> same names as the source directories, where the transferred files
>> don't already exist
> with
>> the same name and time/date in the corresponding target directory.
>> If a file does exist in the same named target directory having the
>> same name as the file in the source directory along with the same
>> time/date then the transfer is aborted. If a file exists with the
>> same name but a different time/date, then the preexisting file in the
>> target directory should be overwritten, with the time/date of the
>> file in the target directory being replaced by that of the
>> transferred file.
>>
>> Don J
>>
>> ----------------------------------------------------------------------
>> ----
> --------
>
> You write "If a file exists with the same name but a ***different***
> time/date, then the preexisting file in the target directory should be
> overwritten, with the time/date of the file in the target directory
> being replaced by that of the transferred file."
>
> I don't think you mean what you write. You probably mean this:
> "If a file exists with the same name but an ***older*** time/date,
> then the preexisting file in the target directory should be
> overwritten, with the time/date of the file in the target directory
> being replaced by that of the transferred file."
>
> The short answer is: Put an appropriate xcopy.exe command into
> a batch file and use the /d switch.
>
>
You may also want to look at the replace.exe command
Or for even more options, download robocopy or synctoy from Microsoft
or xxcopy from www.xxcopy.com (plug those program names into
MSN/Google/whatever search engine you like)