cyber7 Posted February 22, 2012 Posted February 22, 2012 Hi Guys I am very new at AutoIt. After reading a lot of subjects regarding deleting a file, I have found a foolproof way. (Background: I create robocopy.exe out of my exe if the user running my backup does not have it installed. BUT, I then want it deleted...) The delete script removes robocopy out of the directory the script was started from: $robodel = (@ScriptDir&"\"&"robocopy.exe") $handle = FileOpen($robodel,0) ; Open handle $noddefs = FileReadLine($handle) ; Use handle FileClose($handle) ; Close handle FileDelete($robodel) Cheers and I am so glad I stumbled over AutoIT. I was looking at writing a backup for my users in vbs when I came across it. Kind regards Aubrey Kloppers South Africa
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now