d0n Posted August 23, 2009 Share Posted August 23, 2009 (edited) what would be the best way to get the most recent created file should i use _FilelisttoArray and do a FileGetTime in a loop? or is there a better way to accomplish this? so far i have this, which works but think there is a better way to do it $Log = _FileListToArray(@ScriptDir&"\Date") $yyyymmdd1 = 0 $yyyymmdd2 = 0 For $i = 1 to $Log[0] $aTime = FileGetTime(@ScriptDir&"\Date\"&$Log[$i], 1) If Not @error Then $yyyymmdd1 = $aTime[0] & $aTime[1] & $aTime[2] If $yyyymmdd1 > $yyyymmdd2 Then $yyyymmdd2 = $yyyymmdd1 $Recent = $Log[$i] EndIf EndIf Next Edited August 23, 2009 by d0n Link to comment Share on other sites More sharing options...
kaotkbliss Posted September 9, 2009 Share Posted September 9, 2009 I don't know if you found what you were looking for, but you helped me get what I needed... Thank you. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now