Solved

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

Posted on 2008-10-26
1
1,029 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Unlike scripting languages such as C# where a semi-colon is used to indicate the end of a command, Microsoft's VBScript language relies on line breaks to determine when a command begins and ends. As you can imagine, this quickly results in messy cod…
This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 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