HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Software Newsgroups > Windows XP

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-15-2007, 01:48 AM
Don J
 
Posts: n/a
Default 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.

Don J

----------------------------------------------------------------------------------


Reply With Quote
Sponsored Links
  #2  
Old 04-15-2007, 03:06 AM
Pegasus \(MVP\)
 
Posts: n/a
Default 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.


Reply With Quote
  #3  
Old 04-15-2007, 06:12 AM
over@my.place
 
Posts: n/a
Default 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)
Reply With Quote
Sponsored Links
Fix your Windows Problems - FAST.
FREE Safe Scan Registry Check. Locate & Fix Errors in Minutes!
Reply


Thread Tools
Display Modes



All times are GMT. The time now is 09:57 PM.


Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger