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!

VBA Delete Files Help

Status
Not open for further replies.

cydud3

IS-IT--Management
Dec 21, 2004
57
0
0
KE
I'd like to create a VB script which I can run through task scheduler. Basically, I need it to do the following: Delete all files on a specified folder <b>except</b> files whose date modified property is set to less than 5 days ago. Any idea on how to do this? Thanks in advance.

2B||!2B
 
Do you want to do this in VBA or VBScript? You posted in a VBA froum but say you want to write a VB script. This task can be done different ways depending on the snwer. Either way, searching the appropriate froum will turn up several threads on this very task.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Sorry, I didn't realize there are separate forums for VBScript...I'll post it there now.

2B||!2B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top