This part of my code is not returning a meaningful value, just blank. Anyone know what I'm doing wrong? I want to find the most recently modified file and write the name of the subfolder & file name to another file, which is taken care of in another part.
CODE:
Loop, Files, % Folder "\*", FDR
{
if (A_LoopFileAttrib contains D)
{
SubFolder := A_LoopFileFullPath
MostRecentFile := ""
MostRecentTime := 0
Loop, Files, % SubFolder "\*.*", F
{
FileGetTime, FileTime, A_LoopFileFullPath, M
; Using MsgBox shows FileTime is blank.
if (FileTime > MostRecentTime)
{
MostRecentFile := A_LoopFileName
MostRecentTime := FileTime
}
}
if (MostRecentFile != "")
FileAppend, % SubFolder " : " MostRecentFile "`n", %OutputFile%
}
}
Statistics: Posted by gravanoc — Today, 07:07