AHK v1.0.40.05
I noticed this when I was coding a simple file search routine... Here's some code to explain:
Code:
$SeachFolder:="C:\"
$SearchPattern:="*.exe"
loop %$SeachFolder%\%$SearchPattern%,,1 ;-- Intentional double back slashes
{
m=
m=%m%A_LoopFileAttrib=%A_LoopFileAttrib%`n
m=%m%A_LoopFileDir=%A_LoopFileDir%`n
m=%m%A_LoopFileExt=%A_LoopFileExt%`n
m=%m%A_LoopFileFullPath=%A_LoopFileFullPath%`n
m=%m%A_LoopFileLongPath=%A_LoopFileLongPath%`n
m=%m%A_LoopFileName=%A_LoopFileName%`n
m=%m%A_LoopFileShortName=%A_LoopFileShortName%`n
m=%m%A_LoopFileShortPath=%A_LoopFileShortPath%`n
m=%m%A_LoopFileSize=%A_LoopFileSize%`n
m=%m%A_LoopFileSizeKB=%A_LoopFileSizeKB%`n
m=%m%A_LoopFileSizeMB=%A_LoopFileSizeMB%`n
m=%m%A_LoopFileTimeAccessed=%A_LoopFileTimeAccessed%`n
m=%m%A_LoopFileTimeCreated=%A_LoopFileTimeCreated%`n
m=%m%A_LoopFileTimeModified=%A_LoopFileTimeModified%
msgbox %m%
break
}
return
In this example, A_LoopFileLongPath returns an expected value:
C:\WINDOWS\Ralph.exe
However, A_LoopFileDir, A_LoopFileFullPath, and A_LoopFileShortPath return values in the following format:
C:\\WINDOWS\Ralph.exe
Of course, the workaround is to fix the variables before the search loop is executed. I just wondering if these system variables are returning the correct (or expected value) and if so, why isn't A_LoopFileLongPath in the same format?
Thank you for your assistance.