Jump to content

Decrease records in array


 Share

Recommended Posts

I would like to decrease the number of records to make my search for folders quicker, but how is it possible.

If I just use _ArrayDelete function I messup my 1st for..to..next.

Func _MisPlacedAD_Accounts()
    _ArrayDisplay($aAllBackupDestination,"AllBackupDestination")
    _ArrayDisplay($aMisPlacedAD_Accounts,"Before delete")
    Local $aListOfFolders
    for $y = 0 to UBound($aAllBackupDestination) -1
        $aListOfFolders = _FileListToArray($aAllBackupDestination[$y][0],Default,2,False)
        for $z = 0 to UBound($aMisPlacedAD_Accounts) -1
            If _ArrayFindAll($aListOfFolders,$aMisPlacedAD_Accounts[$z]) <> -1 Then
                _ArrayDelete($aMisPlacedAD_Accounts,$z)
            EndIf
        Next
    Next
    _ArrayDisplay($aMisPlacedAD_Accounts,"After delete")
EndFunc

 

Yours sincerely

Kenneth.

Link to comment
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
 Share

×
×
  • Create New...