Solved

Need script to copy files based on last-modified-date

Posted on 2008-10-26
1
1,022 Views
Last Modified: 2008-10-28
I need a script that will copy files from a folder based on modified date.  In other words, I would give it a date/time such as '2008-10-26 17:08' and it would copy all files in the folder I specify which were modified after that time.

I would prefer one that looks thru subfolders as well but that's not imperative.

I know that XCOPY allows selection based on date, but I need date and time

Thanks
0
Comment
Question by:bobgato111
1 Comment
 
LVL 32

Accepted Solution

by:
Robberbaron (robr) earned 125 total points
ID: 22821017
http://tek-tips.com/viewthread.cfm?qid=833148

http://www.rondebruin.nl/folder.htm

the third item on second link seems the best. It uses
If Fdate >= DateSerial(2006, 10, 1)

then modify to
If Fdate >= DateSerial(2008, 10, 26) + TimeSerial(17,07,00) then  ''ie 2008-10-26 17:08'
         FileInFromFolder.Copy ToPath
        End If

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now