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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a routine to delete files that are > 2 weeks old

Status
Not open for further replies.

rawii

IS-IT--Management
Oct 16, 2002
15
0
0
US
I am looking for a quick routine that will delete all files in a network directory that are more that 2 weeks old.
I know that I could do a dir /t /c and pipe it to a text file and then process the names one by out of the file but there seems like there should be an easier way to do this.
How in VB can I look at file dates and react off of them?
 

This question would be best asked in Forum222, but while I am here I will say that you should look up the FileDateTime function in VB's help.

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top