Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


script to delete files older than 2 weeks

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,59686
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> script to delete files older than 2 weeks
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 script to delete files older than 2 weeks - 4/30/2008 12:33:49 PM   
  dukekern

 

Posts: 8
Score: 0
Joined: 4/30/2008
Status: offline
I'm a bit of a newbie and think this should be easy but I can't find anything online. I want a script that I can run that will delete any files in a given folder that are older than 2 weeks. Can someone help me?
 
 
Post #: 1
 
 RE: script to delete files older than 2 weeks - 4/30/2008 12:56:45 PM   
  dm_4ever


Posts: 2174
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
Do a search for
FileSystemObject
DeleteFile
Delete
DateLastModified

I sincerely doubt you'll have a hard time finding examples of this since it seems to be extremely common.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to dukekern)
 
 
Post #: 2
 
 RE: script to delete files older than 2 weeks - 5/1/2008 12:28:16 AM   
  dukekern

 

Posts: 8
Score: 0
Joined: 4/30/2008
Status: offline
I don't have access apparently to search.

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: script to delete files older than 2 weeks - 5/1/2008 12:29:16 AM   
  dukekern

 

Posts: 8
Score: 0
Joined: 4/30/2008
Status: offline
I take that back.

(in reply to dukekern)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> script to delete files older than 2 weeks Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts