Jump to content

Search the Community

Showing results for tags 'modification'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 3 results

  1. I am trying to dynamically get folders and their modification date, I was orientated by this: ; Initial Launch, grab current GetTime $file1_1 = FileGetTime("X:\aescripts\testimg", 0, 1) Timecheck() Func Timecheck() $file1_2 = FileGetTime("X:\test\testimg", 0, 1) If $file1_1 == $file1_2 Then ConsoleWrite("Folder 1 not modified" & @CRLF); ElseIf $file1_1 <> $file1_2 Then ConsoleWrite("Folder 1 modified" & @CRLF) EndIf ; Initial Launch, grab current GetTime $file1_1 = FileGetTime("X:\test\testimg", 0, 1) EndFunc ; Initial Launch, grab current GetTime $file1_1 = FileGetTime("X:\test\testimg", 0, 1) While 1 Sleep(5000) Timecheck() WEnd That works, but it is not dynamic. So I did code following but it does not work properly.    Local $sFootage_01 = "Z:\Footage\ClothImgs\"    Local $aFileListFootageFolder_01 = _FileListToArray($sFootage_01, "*") ; Initial Launch, grab current GetTime For $i = 0 To UBound($aFileListFootageFolder_01) - 1 $newFootageFolder_01 = $sFootage_01 & $aFileListFootageFolder_01[$i] $getTimeNewFootageFolderInit_01 = FileGetTime($newFootageFolder_01, 0, 1) ConsoleWrite("First Filename " & $newFootageFolder_01 & @CRLF) Next Func Timecheck() Local $aFileListFootageFolderRe_01 = _FileListToArray($sFootage_01, "*") If @error = 1 Then ConsoleWrite("not valid path" & @CRLF) Exit EndIf If @error = 4 Then ConsoleWrite("could not find any data" & @CRLF) Exit EndIf For $i = 0 To UBound($aFileListFootageFolderRe_01) - 1 $newFootageFolder_01 = $sFootage_01 & $aFileListFootageFolderRe_01[$i] ConsoleWrite("ArrH " & $aFileListFootageFolderRe_01[$i] & @CRLF) $getTimeNewFootageFolder_01 = FileGetTime($newFootageFolder_01, 0, 1) ConsoleWrite("ZZZ First Filename " & $newFootageFolder_01 & @CRLF) Local $aGetTimeNewFootageFolder_01 = _FileListToArray($newFootageFolder_01, "*") For $u = 0 To UBound($aGetTimeNewFootageFolder_01) -1 If $getTimeNewFootageFolderInit_01 == $getTimeNewFootageFolder_01 Then ConsoleWrite($newFootageFolder_01 & " has not been changed" & @CRLF) ElseIf($getTimeNewFootageFolderInit_01 <> $getTimeNewFootageFolder_01 And $aGetTimeNewFootageFolder_01[0] == 11) Then ConsoleWrite("File 1 has been changed and has " & $aGetTimeNewFootageFolder_01[0] & " images" & @CRLF) ConsoleWrite("Time 1.1: " & $getTimeNewFootageFolderInit_01 & @CRLF & "1.2: " & $getTimeNewFootageFolder_01 & @CRLF) WinKill($hWnd, "") Sleep(8000) RunCm() ListFolders() ExitLoop ElseIf($getTimeNewFootageFolderInit_01 <> $getTimeNewFootageFolder_01 And $aGetTimeNewFootageFolder_01[0] <> 11) Then ConsoleWrite("Path " & $newFootageFolder_01 & " modification date has changed, number of images: " & $aGetTimeNewFootageFolder_01[0] & " files/folders" & @CRLF) Else ConsoleWrite("Else Statement" & @CRLF) EndIf Next Next $aFileListFootageFolderInit_01 = _FileListToArray($sFootage_01, "*") ; Initial Launch, grab current GetTime For $i = 0 To UBound($aFileListFootageFolder_01) - 1 $newFootageFolder_01 = $sFootage_01 & $aFileListFootageFolder_01[$i] $getTimeNewFootageFolderInit_01 = FileGetTime($newFootageFolder_01, 0, 1) Next EndFunc $aFileListFootageFolderInit_01 = _FileListToArray($sFootage_01, "*") ; Initial Launch, grab current GetTime For $i = 0 To UBound($aFileListFootageFolder_01) - 1 $newFootageFolder_01 = $sFootage_01 & $aFileListFootageFolder_01[$i] $getTimeNewFootageFolderInit_01 = FileGetTime($newFootageFolder_01, 0, 1) Next ; check every 5s if files in footage folder has been changed While 1 Sleep(5000) ConsoleWrite("While Loop " & @CRLF) Timecheck() WEndIt always goes to the first ElseIf Statement and tells me that the files have been changed. So I printed out the modification dates and this varaible shows correctly the current modification date of the subfolder $getTimeNewFootageFolder_01 and this $getTimeNewFootageFolder_01 does show another modification date of another folder which I do not understand. Again the code (not dynmaic one) above works, but trying to make it dynmacly did not work.
  2. Whats is the best method to know if a specific folder has changed his files. In my case I want to check if pictures in my folder have been changed or not. (If someone is interest in future plans I want to count afterwards the files in that folder, but that is not important now) Can anyone help me out, I though of something like getting the current modification date and comparing it somehow with the future one but I do not know if something like that is even possible. SO basically again I "Just" want to check if a specific folder ( files in that folder) have been changed.
  3. I'm using ftp functions but the modification time always have 0 seconds. Is it how it should work? I checked in FileZilla and it returns seconds.
×
×
  • Create New...