Last active
April 8, 2016 09:08
-
-
Save grayatrox/9441281e7025896d5656452523341c0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance, Force | |
SetBatchLines, -1 ; Make the operation run at maximum speed. | |
lastFileModified := GetLastModified(A_MyDocuments,"") | |
FormatTime, OutputVar, %lastFileModified% | |
msgbox %outputVar% | |
GetLastModified(file, ByRef _lastModified) { | |
;msgbox Looping %file% | |
Loop, Files, %file%*.*, DF | |
{ | |
if (InStr(FileExist(A_LoopFileFullPath), "D")) { | |
;msgbox %A_LoopFileName% is a Directory! Should now recurse into %A_LoopFileFullPath% | |
new_LastModified := GetLastModified(A_LoopFileFullPath "\",_lastModified) | |
if (new_LastModified > _LastModified){ | |
;msgbox _LastModified changed by recursion | |
_LastModified := new_LastModified | |
} | |
} | |
Else If (A_LoopFileTimeModified > _LastModified && A_LoopFileTimeModified < A_Now) { | |
;Msgbox _LastModified changed by file: %A_LoopFileName% | |
_LastModified := A_LoopFileTimeModified | |
} | |
} | |
Return _LastModified | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment