FrancescoDiMuro Posted August 26, 2018 Posted August 26, 2018 @Nunos So, according to the Help file about _FileListToArrayRec() function, check out this too: Failure: an empty string and sets the @error flag to 1 with @extended set as follows: 1 - Path not found or invalid 2 - Invalid Include parameter 3 - Invalid Exclude parameter 4 - Invalid Exclude_Folders parameter 5 - Invalid $iReturn parameter 6 - Invalid $iRecur parameter 7 - Invalid $iSort parameter 8 - Invalid $iReturnPath parameter 9 - No files/folders found Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Nunos Posted August 26, 2018 Author Posted August 26, 2018 So can I maybe do... If @error = 1 Then MsgBox(0,"""There was an error while getting the list of files/folders.") Else _ArrayDisplay($b) and then it could end the script if nothing is found or is there a better way?
FrancescoDiMuro Posted August 26, 2018 Posted August 26, 2018 @Nunos As I have told you above, check the @extended code too, in order to see which is the error Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Nunos Posted August 26, 2018 Author Posted August 26, 2018 (edited) Okay so it is 9 so I guess a select case with the @extended codes and then msgbox's based on that? Edited August 26, 2018 by Nunos
FrancescoDiMuro Posted August 27, 2018 Posted August 27, 2018 (edited) @Nunos If you want to Switch/Select every case of the @extended code, your choice. But the point was/is, that the _FileListToArrayRec() is not finding anything you put in the filter. That was/is the issue Edited August 27, 2018 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
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