Delete file after 4 hours VB script

kakashisharingun
kakashisharingun used Ask the Experts™
on
A shiny 500 points for those who can help me - I'm in need of a code which will do exactly the following:

If the file in the following location (c:\play.txt) has NOT been modified within the last 300 minutes, then delete this file.

I need it to be able to be written into a ".vbs" file.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jini JoseSenior .Net Developer

Commented:
how will you do this ?
did you want this script to run automatically or you will double click to open it ?

Author

Commented:
Double click is what I had hoped for
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

Hi,

Here it is how you can do it

Cheers
Delete4hourFile.vbs

Author

Commented:
Works absolutely brilliantly and an amazingly quick response - absolute life saver
Great! glad to help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial