jimg Posted October 6, 2013 Share Posted October 6, 2013 I need to check a folder to see if any of it's contents have been modified sine the last time the folder was backed up. The folder has thousands of small files in it, so doing a _FileListtoArray, then doing a FileGetTime for each entry while finding the newest seems onerous. Any better ways? Link to comment Share on other sites More sharing options...
Rogue5099 Posted October 7, 2013 Share Posted October 7, 2013 You would have to check file by file, that would be the only way to see which files have been modified. I see no other way around it. My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
Malkey Posted October 7, 2013 Share Posted October 7, 2013 This example may give you some ideas. Local $fso, $file, $recentFile Local $sPath = "C:\Users\Mal\Documents\AutoIt" Local $sStartDate = "20130901120000" ; Time = "2013/09/01 12:00:00" ; http://stackoverflow.com/questions/17446286/batch-script-write-date-of-oldest-file-in-a-dir-to-text-file $fso = ObjCreate("Scripting.FileSystemObject") For $file In $fso.GetFolder($sPath).Files If ($file.DateLastModified > $sStartDate) And _ ; If the file's DateLastModified is greater than (>) the specified $sStartDate Then StringRight($file.name, 3) == "au3" Then ; Only those fifes with "au3" extension ConsoleWrite($file.DateLastModified & " " & $file.name & @LF) EndIf Next mLipok 1 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