Trong Posted January 29, 2019 Posted January 29, 2019 #RequireAdmin Global $DellItPath="D:\zWebSrv\MercuryMail\PNG" MsgBox(0,"",DirRemove($DellItPath,1)&"-"&@error&"-"&@extended&@CRLF) ; 0-0-0 ; Check with Unlocker, no program is using the path. The Unlocker can delete it, but I want to delete it with AutoIt. Do you have any ideas? Enjoy my work? Buy me a 🍻 or tip via ❤️ PayPal
TheSaint Posted January 29, 2019 Posted January 29, 2019 (edited) It is likely that if image files exist in the PNG folder, that Explorer.exe is perhaps creating a preview or something, which might be solved by opening the folder. Windows Explorer is also notorious for not letting go of things like images, especially in older Windows. It could also be related to your Anti-Virus program. Try a program like Unlocker or What is Locking This Folder etc, to see if any handles are open, making it or one of its contents in use. EDIT - somehow I missed your mention of Unlocker. oops. Edited January 29, 2019 by TheSaint Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
TheSaint Posted January 29, 2019 Posted January 29, 2019 (edited) Further to my last, it could be related to whatever code you are using, if one of your code procedures has a handle open during processing of that folder. The solution for that is to make sure anything like that is closed before using DirRemove. This can easily happen if you have something like FileOpen in use and are yet to use FileClose. Failing that, it could be some screwed security setting issue. I once had a situation that lasted months, and then magically cleared up. I put it down to a WIndows Update causing it and another one fixing it. It didn't happen for just one folder or file though, it happened with a lot ... would not let me rename, only delete ... drove me nuts, and I had to code work-a-rounds. No amount of web searching helped me, just plenty of others complaining about same issue, and a bunch of non-working solutions. This was manually renaming, not even using code ... which didn't work either. What Is Locking This Folder was very helpful. I believe it was related to security measures over Ransomware. It was just after the big English hospital incident. Edited January 29, 2019 by TheSaint Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
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