Jump to content
Sign in to follow this  

Compare two _FileListToArrayEx - need help

Recommended Posts


I begin in autoit :)

I have a question when i use : Func _FileListToArrayEx($s_path, $s_mask = "*.*", $i_flag = 0, $s_exclude = -1, $f_recurse = True, $f_full_path = True) Thx to SmOke_N

How i can compare two arrays from this function ?

I have already try _diff but that's dosent work.

I write a script to do a backup ( First time it's a full backup of Desktop for example ) and after the full backup i need to check all file modified and then copy it to the destination source.

If $inireaddesktop = "yes" Then
        Dim $aRet

        $source = _FileListToArrayEx($FileList, "*.*", 0, "", True)
        $destination = _FileListToArrayEx($FileListDst, "*.*", 0, "", True)

        $aRet = _Diff($source, $destination)

        For $i=1 to $aRet[0] - 2
            FileCopy($source[$i], $FileListDst,8)
            _FileWriteLog(@ScriptDir & "\Backup Tools.log", "New Fiché: " & $aRet[$i] & "Modifier -> Backup ok.")

        For $i=1 To $aRet[0] - 2
            $Checksrcmodifieddate = FileGetTime($source, 0,1)
            $Checkdstmodifieddate = FileGetTime($destination,0,1)

            If _DateDiff("D,M,Y,h,n",$Checksrcmodifieddate,$Checkdstmodifieddate) Then
                MsgBox(4096,"Date", "OK")
                _FileWriteLog(@ScriptDir & "\Backup Tools.log", "Fiché: " & $source[$i] & "Modifier -> Backup ok.")
                ConsoleWrite("Fiché: " & $source[$i] & "Modifier -> Backup ok.")

            _FileWriteLog(@ScriptDir & "\Backup Tools.log", "Aucun Fiché modifié trouvé")
elseIf $inireaddesktop = "no" Then
    ;MsgBox(0,"TEST","It's set to no")
ElseIf $inireaddesktop <> "yes" or "no" Then
    ;MsgBox(0,"Error","No value found in the Bkconfig.ini")

Can you help me please ?

Have a good day.

Thx !!!

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...