Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete the current script

Status
Not open for further replies.

eatcheese

Technical User
Jun 28, 2010
4
US
The following code will delete the current script:
Code:
CreateObject("Scripting.filesystemobject").deletefile(wscript.scriptfullname)
This will run AS IS! Do not substitute!
It would be great if I could know that this wasn't a waste of my time. If anyone finds a use for this, please reply. My only uses so far are in little prank scripts (not getting caught).
Be warned: if you throw this in your script and get an error, you may never find the error!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top