Once the Loop obtains the file name, I'm attempting to run RegExMatch on A_LoopFileName to obtain just the Smith, John portion of the file name. I'm using the following regex successfully in other scripts that returns the Smith, John portion of the file name:
Code: Select all
.+\\\K.+?, \w+
So when I type ;ca and hit space, it should insert the following text → New File Created - Smith, John
Any help is appreciated.
Code: Select all
:o:;ca::
Loop, Files, %A_Desktop%\MyFolder\*.xlsx
RegExMatch(A_LoopFileName, ".+\\\K.+?, \w+", VName)
SendInput, {Text}New File Created - %VName%
return