Computing.Net > Forums > Programming > self deleting batch file

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

Reply to Message Icon

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.

Thanks,
REMGU



Sponsored Link
Ads by Google

Response Number 1
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
Reply:

I found the solution from Mechanix2Go here:

http://www.computing.net/programmin...

Thanks Mechanix2Go!

Thanks,
REMGU


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: self deleting batch file

self destruct batch file ? www.computing.net/answers/programming/self-destruct-batch-file-/17288.html

Batch file waits for Notepad www.computing.net/answers/programming/batch-file-waits-for-notepad/13205.html

search and delete batch file www.computing.net/answers/programming/search-and-delete-batch-file/16412.html