using.bat to move files based on date created

March 9, 2010 at 19:30:49
Specs: Windows XP
Hi, I am tring to create a .bat file that will move files based on their creation date, anything older than a day needs to be archived, any ideas?

See More: using.bat to move files based on date created

Report •


#1
March 10, 2010 at 02:24:05
Currently working on such a solution. If you need a copy of my scripts/executables, send me a PM, and specify your email adress. Write your email addess this way, to avoid spam scanners to pickup your email: firstname.lastname(at)server.com

Report •

#2
March 10, 2010 at 05:31:49
Here's a VBScript (albeit untested):
For Each f In CreateObject("Scripting.FileSystemObject").GetFolder(".").Files
  If f.DateCreated <= Now - 1 Then _
    f.Move "c:\someOtherFolder\"
Next 'f


Report •

#3
March 17, 2010 at 14:39:42
I'd start with
---Copy files and folders older than 1 day----
ROBOCOPY C:\Temp C:\Data *.txt /move /minage:1

Does it help?
BTW, Temp is source and Data is Dest.

Report •

Related Solutions


Ask Question