Valnurat Posted February 4, 2016 Posted February 4, 2016 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.
AutoBert Posted February 4, 2016 Posted February 4, 2016 Change your inner loop to for $y = UBound($aAllBackupDestination) -1 to 0 Step -1
Valnurat Posted February 4, 2016 Author Posted February 4, 2016 (edited) Argh, sorry. It was not the 1st for..to..next, but the 2nd for..to..next. But changing the 2nd loop worked. Thank you. Edited February 4, 2016 by Valnurat Yours sincerely Kenneth.
AutoBert Posted February 4, 2016 Posted February 4, 2016 Yes it must be the second (inner) loop, by copy paste i used the 1. (outer) loop, sorry.
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