Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to move files based on modified date on the network?

Status
Not open for further replies.

sukadelic

IS-IT--Management
Apr 13, 2009
15
US
Hi,
i'm new to vbscript and I want to ask you guys for my problem.
I need to clean up some files on a network folder that are more than 2 weeks old then move them to a temp folder on a file server for a week and delete them afterward. I'm thinking to move files based on modified date, but how do I get this info from a file and compare it with the current date.

thanks
 
I'd have a look at using the FileSystemObject (specifically the GetFile() method and the DateLastModified property).

Hope this helps

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

You can hang outside in the sun all day tossing a ball around, or you can sit at your computer and do something that matters. - Eric Cartman

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top