Alternative to FileSelectFolder, folder - No Gui
-
- Posts: 25
- Joined: 12 Nov 2019, 16:32
Alternative to FileSelectFolder, folder - No Gui
What path can I substitute for" FileSelectFolder, folder, etc..." in cases where I don't require a Gui to prompt me with an option to manually select a folder to loop through?
Re: Alternative to FileSelectFolder, folder - No Gui
Hi @mojobadshah
There's a resource shared by all processes in Windows, the Current Directory aka the AHK working directory, or A_WorkingDir. It can be changed at any time with SetWorkingDir. Is that what you are looking for?
There's a resource shared by all processes in Windows, the Current Directory aka the AHK working directory, or A_WorkingDir. It can be changed at any time with SetWorkingDir. Is that what you are looking for?
itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
Re: Alternative to FileSelectFolder, folder - No Gui
Maybe I'm wrong, but it seems that you have a script that at every run it prompt you to select a folder and this annoys you.
If so, you can simply set a variable with the full path of the folder to loop through.
So instead of:
You can use:
The advantage of using the FileSelectFolder is that, at every run, you can chose a different folder to loop through.
Hope this helps.
If so, you can simply set a variable with the full path of the folder to loop through.
So instead of:
Code: Select all
FileSelectFolder, folder, c:\
Loop Files, %folder%\*.txt
{
....
}
Code: Select all
folder := "the_full_path_of_your_folder"
Loop Files, %folder%\*.txt
{
....
}
; or even:
Loop Files, the_full_path_of_your_folder\*.txt
{
....
}
Hope this helps.
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode