Sign in to follow this  
Followers 0
thenewkid

i made a script to delete itself

11 posts in this topic

ok heres the thing i made a script that will delete it self when its finshed running but i forgot about that part and i ran it and now its gone is there any whay to get it back?


some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Share this post


Link to post
Share on other sites



Is it in the recycle bin? If not, you'll need an undelete utility.

Share this post


Link to post
Share on other sites

hahahahaha..Oh, thanks for giving me a laugh.

I think there's no way to get it back... they don't go to the recycle bin. I hope the script wasn't too long.

A way to avoid this is to run the script from SciTe. It will delete the script but then you'll be able to save it again :)

Share this post


Link to post
Share on other sites

ok heres the thing i made a script that will delete it self when its finshed running but i forgot about that part and i ran it and now its gone is there any whay to get it back?

Well the script would still be saved if you ran a compiled version of it... and in order to run the script itself, you would have ran it in an Editor like SciTE, so it should still be open in SciTE, just re-save it before you close the editor.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

it not compiled i ran it by right clicking the .au3

@Heffed do you know of a undelete utility website address

Edited by thenewkid

some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Share this post


Link to post
Share on other sites

From the SciTE Helpfile

Func _SelfDelete()
    Local $cmdfile
    FileDelete(@TempDir & "\scratch.cmd")
    $cmdfile = ':loop' & @CRLF _
    & 'del "' & @ScriptFullPath & '"' & @CRLF _
    & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _
    & 'del ' & @TempDir & '\scratch.cmd'
    FileWrite(@TempDir & "\scratch.cmd", $cmdfile)
    Run(@TempDir & "\scratch.cmd", @TempDir, @SW_HIDE)
EndFunc

My UDFs:- _RegEnumKey

Share this post


Link to post
Share on other sites

He search a function which delete a script


My UDFs:- _RegEnumKey

Share this post


Link to post
Share on other sites

He search a function which delete a script

No, he already wrote a script that deleted itself.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

No he didn't Tiger, he did not want a selfdelete script, he already has one. He wants an Undelete utility.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0