"Pegasus \(MVP\)" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):
> "Don J" <(E-Mail Removed)> wrote in message
> news:GdKdne-(E-Mail Removed)...
>> 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)