Delete a .mdb file?

hippo21 used Ask the Experts™
I have a access database that exports to excel files autmoatically.  Because I am going out of town, I want certain .mdb files to be deleted on certain dates so that they stop exporting and so that no one else can have access to them.  Is there code that will do this?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
use could do it through the windows scripting host ... and write a neat vbscript using the filesystemobject ... just a thought
then schedule the .vbs file with the windows scheduler ...

I wil give you a more simple and easy way to do this.

go to Download the freeware tool TDel.exe

copy this to you disk press TDEL.EXE /? This will give all detail on how to configure it.
I wrote a bat file to delete files periodically, and this works great.

REM Delete all tmp files older than 2 days.

c:\remove\tdel.exe @c:\remove\scripts\tmpfiles.bat /days:2..
/D- /Q /Y /LOG:c:\remove\log\tmpfiles.log

REM Delete all log files older than 2 days.

c:\remove\tdel.exe @c:\remove\scripts\logfiles.bat /days:2..
/D- /Q /Y /LOG:c:\remove\log\logfiles.log

I this answer satisfies your question, please accept it.
I can use the expert points.


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