How to deal with 「Folder in Use」?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
nutnutwin
Posts: 76
Joined: 28 Aug 2019, 07:25

How to deal with 「Folder in Use」?

16 Apr 2021, 19:16

Hi,
I have a KillAll.ahk File to Close all the autohotkey process(for debug)

Code: Select all

	Loop{
		Process, Close, Autohotkey.exe
		Process, Close, AutoHotkeyU64.exe
		Process, Close, AutoHotkeyU32.exe
		Process, Close, AutoHotkeyA32.exe
	}
the problem is that, after running KillAll.ahk,
the folder that contains this script is 「Folder in Use」, if I try to delete it
Have to sign out of windows

Wonder if there is a workaround?(like using something else to replace Process, Close),
Or it's just a windows thing(happens all the time)

Thank you
saph
Posts: 68
Joined: 25 May 2020, 12:09

Re: How to deal with 「Folder in Use」?

16 Apr 2021, 20:28

I use a .bat file with one line: taskkill /im "autohotkey.exe"

I then have this in a .ahk file

5::
run, C:\\\\AUTOHOTKEY\\\kill.bat
nutnutwin
Posts: 76
Joined: 28 Aug 2019, 07:25

Re: How to deal with 「Folder in Use」?

17 Apr 2021, 00:31

saph wrote:
16 Apr 2021, 20:28
I use a .bat file with one line: taskkill /im "autohotkey.exe"

I then have this in a .ahk file

5::
run, C:\\\\AUTOHOTKEY\\\kill.bat
Thanks for the help.
Yes this runs faster than my Process, Close Loop
Yet still keep the Folder(which contains my bunches of .ahk) 「in Use」
Will see if it can be reproduced
# [20210417_Sat]-143622 Update

I tried several times
- Run All Scripts using a bootstrap ahk
- Run, taskkill /im "autohotkey.exe
- Check if I can delete the folder(failed, 「in use」)
- Sign out, repeat above

No, every time I tried, it is in use

think it is a Windows thing...
Thank you.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: gongnl, Rohwedder and 252 guests