great77 Posted August 29, 2017 Share Posted August 29, 2017 sleep(1000) $avoid_overwrite = _FileListToArray("D:\Automation\A_List\aa_024", Default, 2) ; the 2 is to return folders only If @error Then Exit ;;;;;;;;MsgBox(0, "Error", "_FileListToArray returned @error = " & @error) sleep(2000) For $avoid_index = 1 to UBound($avoid_overwrite) - 1 And $parent = 1 To 100 Step 1 MsgBox(0, "Error", $avoid_overwrite[$avoid_index] & $parent& @error) DirMove("D:\Automation\A_List\aa_024\" & $avoid_overwrite[$avoid_index] , "D:\Automation\temp_process\" & $parent, 1) sleep(4000) Next I have a problem with using AND to help in looping moving the folders with subfolders. The folders to move must maintain the structure and also am avoiding duplicate especially when Dirmove with 0(do not overwrite) is misbehaving. Can anyone tell me how I can use these 2 loop function becuase the FOR can not be nested. Help and suggestions highly appreciated Link to comment Share on other sites More sharing options...
jguinch Posted August 29, 2017 Share Posted August 29, 2017 Increase $parent in the loop, like this : Local $parent = 1 For $avoid_index = 1 to UBound($avoid_overwrite) - 1 DirMove("D:\Automation\A_List\aa_024\" & $avoid_overwrite[$avoid_index] , "D:\Automation\temp_process\" & $parent, 1) $parent = $parent + 1 Next Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
great77 Posted August 29, 2017 Author Share Posted August 29, 2017 9 minutes ago, jguinch said: Increase $parent in the loop, like this : Local $parent = 1 For $avoid_index = 1 to UBound($avoid_overwrite) - 1 DirMove("D:\Automation\A_List\aa_024\" & $avoid_overwrite[$avoid_index] , "D:\Automation\temp_process\" & $parent, 1) $parent = $parent + 1 Next Wow. Thanks ! It works ! 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