Solved

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

Posted on 2008-10-26
1
1,041 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

732 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