Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
self deleting batch file
Name: remgu Date: February 14, 2008 at 13:41:40 Pacific OS: xp/vista CPU/Ram: P4 3.4Ghz 3GB Ram Product: Clone
Comment:
How can I create a self deleting batch file. i have the batch file and I know you can use the del command but what I want to do is have it self delete after a certain date. Any help would be appreciated.
Also would there be a way to make it more complex? Like have it delete after a certain date unless some other action is taken or a key is pressed at which time the date would be increased another 3 months or so.
Name: Razor2.3 Date: February 15, 2008 at 06:06:27 Pacific
Reply:
Yes, you can. CMD will throw an error after the script self-deletes, but it'll work.
As for the logic, I don't deal with dates.
0
Response Number 2
Name: remgu Date: February 15, 2008 at 06:38:44 Pacific
Reply:
I have been able to actually just have it self delete with no errors but I don't know how to go about using the logic for the date. I'm hoping someone knows how.
Thanks, REMGU
0
Response Number 3
Name: remgu Date: February 20, 2008 at 11:30:14 Pacific
Summary: hi.. sorry if this sounds dumb...but i always wondered is there away to create a self destruct batch file ??? i mean if the file is executed it should but when opened for editing/viewing source the wh...
Summary: There is a way to work around my posted NO to self-deleting batch file, but a third party utility is required. First download Sleep.exe (freeware) from http://www.computerhope.com/dutil.htm don't car...
Summary: I found this code and tried to modify it for my purposes. I wanted to find the word "cookie" in some text based files and then delete the file if found. If the word "cookie" is on its own line, the f...