Home All Groups Group Topic Archive Search About


Author
13 Aug 2005 4:29 PM
Ben
Is there a way to copy only the most recently modified or created file(s) to
anther directory.  I have a directory with backup files in it and I want to
copy the mose recently created or modified backup file to another directory
on a daily basis.  Thanks.

Ben

Author
13 Aug 2005 4:36 PM
Torgeir Bakken (MVP)
Ben wrote:

> Is there a way to copy only the most recently modified or created file(s) to
> anther directory.  I have a directory with backup files in it and I want to
> copy the mose recently created or modified backup file to another directory
> on a daily basis.  Thanks.
>
> Ben
Hi,

The command line tool Robocopy.exe supports this.


Robocopy.exe is in the free Windows Server 2003 Resource Kit:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

(The kit will install on WinXP or later, the individual files can
then be copied to another computer if needed)


See rktools.chm and robocopy.doc for documentation for Robocopy.exe.



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

AddThis Social Bookmark Button