jaberwacky Posted August 6, 2013 Share Posted August 6, 2013 I guess my next question is this: why does a recursive file list to array hold such a firm footing on the rock that is your heart? Were you trying to use it as a way to make yourself known as a clever if not spiffy coder? Dreams which were smashed on the rocky shore when your contributions were the last to appear on the rolling credits? FireFox and Carolina 2 Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 6, 2013 Moderators Share Posted August 6, 2013 Good evening,I know I said I would not post again in this thread - but since the direct question was asked (yet again), as the author I will explain (yet again) why I wrote a sort as an integral part of the UDF: ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~A recursive file/folder search can produce a fairly large number of returns in the array. Depending on the manner in which the sort is carried out (recursive or iterative) and the type of file structure (FAT or NTFS) being scanned, the elements of this array can be pretty disordered.In some cases it is preferable for these results to be ordered in some way. A simple alphabetical sort can suffice - and the UDF does that when the elements are such that the resultant order is not chaotic (simple filenames for example).However, if the nature of the returns is more complex, a simple alphabetic sort can give returns like this:A_Folder\A_File A_Folder\B_Subfolder\ A_Folder\B_Subfolder\C-Subfolder\ A_Folder\B_Subfolder\C-Subfolder\F_file A_Folder\B_Subfolder\F_File A_Folder\F_File F_Filewhere folders and the files within (or even files in the same folder) are not necessarily in close proximity within the listing. In fact an alphabetic listing is often even more disordered than the original unsorted return.The integral sort within the UDF would return those same elements like this:F_File A_Folder\A_File A_Folder\F_File A_Folder\B_Subfolder\ A_Folder\B_Subfolder\F_File A_Folder\B_Subfolder\C-Subfolder\ A_Folder\B_Subfolder\C-Subfolder\F_Filewhich I submit is more logical and better suited to subsequent use in the script such as filling a combo or a ListView. We are used to seeing Explorer display alphabetically-ordered folders with alphabetically-ordered files within them - that is what the UDF integral sort produces.; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~So there you have the reason for the integral sort within the UDF. But as I retreat again from posting on this evidently emotive subject (for some at least) I would just like to leave you all with a thought: Is it not enough that Jon is content for the UDF to be included in its current form, or do some of you want to have veto rights over the AutoIt development choices? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Spiff59 Posted August 6, 2013 Author Share Posted August 6, 2013 Nope, I don't want to be god. I suppose Jon, Jos and the gang have reviewed this thread. Repeating myself by responding to on-going coding challenges, feigned ignorance, or personal attacks, won't add any additional content to my argument. I guess my next question is this: why does a recursive file list to array hold such a firm footing on the rock that is your heart? Were you trying to use it as a way to make yourself known as a clever if not spiffy coder? Dreams which were smashed on the rocky shore when your contributions were the last to appear on the rolling credits? If that's not a childish flame (awaiting moderation), I don't know what is. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 6, 2013 Moderators Share Posted August 6, 2013 I think this line says it best: Is it not enough that Jon is content for the UDF to be included in its current form M23 Once this was established - all other arguments in this thread (for or against) were rendered moot. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
AZJIO Posted August 6, 2013 Share Posted August 6, 2013 Melba23 Your files are returned in reverse order. This requires more time for sorting. My other projects or all Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 6, 2013 Moderators Share Posted August 6, 2013 AZJIO,Yes, because the UDF is iterative and not recursive. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 6, 2013 Moderators Share Posted August 6, 2013 All,AutoIt has needed a recursive file search for a long time. It now has one and all that has happened is certain people complaining about it - at length. I did not force anyone to add my UDF to the standard set - it was chosen by others. I am very happy that it was chosen, but I would not have objected had another UDF been selected in its place. As previously stated, I would be quite happy to maintain my current UDF in the Examples section. I post code here for the benefit of the community as a whole - not to show how good a coder I am. Besides there are several here who are vocal in suggesting that I am anything but a good coder. But this particular witch-hunt has gone on for long enough. If anyone has any reasons to object to the UDF as it stands, please do so now. I am quite happy to defend it and ask for it to be withdrawn if sufficient reason is demonstrated. But judging from the response to the original UDF thread in the Examples section it seems that only a very small, if extemely vocal, minority have problems. So please go ahead - if you feel that the UDF should not become part of the standard set, here is your chance to say so. But I do ask that you offer some serious justification for your opinion - a mere "No" is not going to influence anyone. M23P.S. And if you take from the above that I am seriously pissed off - you are absolutely correct. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
trancexx Posted August 6, 2013 Share Posted August 6, 2013 What witch-hunt? Only Spiff59 had some objections to your function. And his primary objection was about the way it was added because he was "shoot down" back then with his function for reasons that no longer seem valid because Jon sees things differently than Valik. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Spiff59 Posted August 6, 2013 Author Share Posted August 6, 2013 What witch-hunt? Only Spiff59 had some objections to your function. And his primary objection was about the way it was added because he was "shoot down" back then with his function for reasons that no longer seem valid because Jon sees things differently than Valik. That's such a deeply twisted distortion of my stated "primary objection" that it's unrecognizable. My objection is that Autoit becomes unmanageable and eventually a POS when you start unnecessarily cramming the kitchen sink into functions. I'm happy to let the thread die if you psychoanalysts are through. jaberwacky 1 Link to comment Share on other sites More sharing options...
trancexx Posted August 6, 2013 Share Posted August 6, 2013 (edited) That's such a deeply twisted distortion of my stated "primary objection" that it's unrecognizable. My objection is that Autoit becomes unmanageable and eventually a POS when you start unnecessarily cramming the kitchen sink into functions. I'm happy to let the thread die if you psychoanalysts are through. That's what I said. Seems both you and Melba23 take things too much to your heart. You both react the same in this case. edit: oh and yes... I'm over and out. Edited August 6, 2013 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
AZJIO Posted August 7, 2013 Share Posted August 7, 2013 Melba23Yes, because the UDF is iterative and not recursive.Above I made an example of "iterative" returns with the order as a "recursive".95% = NTFS, sorting is not required, as in alphanumeric order returns are sorted My other projects or all Link to comment Share on other sites More sharing options...
czardas Posted August 7, 2013 Share Posted August 7, 2013 (edited) The integral sort within the UDF would return those same elements like this:F_File A_Folder\A_File A_Folder\F_File A_Folder\B_Subfolder\ A_Folder\B_Subfolder\F_File A_Folder\B_Subfolder\C-Subfolder\ A_Folder\B_Subfolder\C-Subfolder\F_File which I submit is more logical and better suited to subsequent use in the script such as filling a combo or a ListView. We are used to seeing Explorer display alphabetically-ordered folders with alphabetically-ordered files within them - that is what the UDF integral sort produces. Thanks for this explanation. I do see the benefit of including a sort option in the function. I still don't understand how this justifies function duplication though. Please understand I'm expressing my confusion and not a personal opinion. I think it's a great idea to include this. BTW, my version of Explorer sorts folders first - I'm not sure if thats what you intended. I'm sure you must have tried all available options. I can see how this can be confusing due to the recursive nature of the data. Edit Yes, because the UDF is iterative and not recursive. Oops I missed this. I wasn't aware there was a difference until now. Edited August 7, 2013 by czardas operator64 ArrayWorkshop 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