Jump to content

Deleting Temp Files Older than 30 Minutes


JRI_Work

Recommended Posts

I have a site that builds a new temp txt file in a dedicated folder each time a user logs in. This file tracks various things about the user's activity. Each user's file is updated every time they go to a web page within the site.Each time a person goes to a web page within the site, I need to run some ASP script to loop through the folder containing the txt files, and for each one that has not been modified in the past 30 minutes, then it should delete the txt file(s).This is a low volume web site, so this logic should not be a problem.How do I write the logic to loop through the folder and test for older than 30 minutes?

Link to comment
Share on other sites

Look into the filesystemobject, you can use that to do things like get the contents of a directory, and each file object should give access to the properties for that file, such as last modified date.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...