Find Filename Using Wildcard and Variable
Posted: 07 Dec 2019, 18:15
I'm trying to use a combination of a wildcard and a variable to select a file (the first matching file found). As a simplified example:
In the "Loop" line, if I replace %var% with the actual value (1), it works fine.
Code: Select all
var := 1
Loop, E:\xxjb\A\%InFolder%\*%var%.txt
{
SelectedFile := A_LoopFileName
break
}
msgbox, %SelectedFile%
}