The idea i tried to do is to find the most updated excel file in a folder and to copy its route so i can use it later, but when i try to execute it, i get the following file name shows with ~$ signs added to it
this issue doesnt appear when i search other files like .pdf or anything else, if anyone can assist it would be greatly appreciated
the code is written in AHK :
Code: Select all
^1::
TP_Daily := "folder path"
run, %Daily%
Loop, %Daily%\*.*
{
FileGetTime, Time, %A_LoopFileFullPath%, C
If (Time > Time_Orig)
{
Time_Orig := Time
File := A_LoopFileName
}
}
MsgBox, Newest file in %Daily% is %File%
Thanks for any idea that comes to mind