Nine Posted March 2, 2021 Share Posted March 2, 2021 (edited) I made this because I wanted a specific behavior when selecting multiple folders at once. With this UDF, you select the folders you want by checking the TreeView checkbox of each folder. Automatically, it will show in the selection ListBox at the right of the TreeView. If you uncheck the folder, it will be removed from the ListBox. By selecting (highlighting) a folder, a list of the files included in that specific folder will replace the selection ListBox. If you check/uncheck a folder, the selection ListBox will reappear. I also needed a Root Selector that enables Drives and Network (UNC) selection that can serve to start the Multiple Folders Selector. This is practical if you need to select a large number of folders from a specific part of the tree. Be careful though when selecting a Root that includes hundreds of subfolders. Selecting C:\ as a root can take quite some time to be shown. Version 2021-03-04 * Added optional list of folders to be pre-checked (must be full path name and 0-based) Here a simple example : #include <Array.au3> #include "MultiFoldersSelectorUDF.au3" ; Select root folder and return all chosen folders Local $sSelectedRoot = _MFS_SelectRootFolder() If @error Then Exit Local $aListFolder = _MFS_SelectMultipleFolders($sSelectedRoot) If Not @error Then _ArrayDisplay($aListFolder) ; Pre-check all folders starting with "Aut" in AutoIt3 root folder and returns new checked/unchecked list of folders Local $aPreChecked = _FileListToArrayRec(@ProgramFilesDir & "\AutoIt3", "Aut*", $FLTAR_FOLDERS, $FLTAR_RECUR, $FLTAR_SORT, $FLTAR_FULLPATH) _ArrayDelete($aPreChecked, 0) $aListFolder = _MFS_SelectMultipleFolders(@ProgramFilesDir & "\AutoIt3", $aPreChecked) If Not @error Then _ArrayDisplay($aListFolder) Let me know if you find it useful. MultiFoldersSelectorUDF.au3 Edited March 4, 2021 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Link to comment Share on other sites More sharing options...
Nine Posted March 4, 2021 Author Share Posted March 4, 2021 New version available “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping 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