trashy Posted March 15, 2018 Share Posted March 15, 2018 I am using FileSelectFolder to select a folder and save multiple files to it. Is there an easy way to display All content, Files and folders. I don't need to select a file I just need users to see folder content before saving. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 15, 2018 Moderators Share Posted March 15, 2018 So you want to see what: a boolean yes/no if the folder contains files?, number of files in each folder?, names of files in folder? "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...
trashy Posted March 15, 2018 Author Share Posted March 15, 2018 I need any and all files to be displayed in FileSelectFolder window. Some of the files I'm adding, saving to this folder are new some are intended to over write existing files. If files are visible in FileSelectFolder it will help users decide if they have the correct folder. Link to comment Share on other sites More sharing options...
Subz Posted March 15, 2018 Share Posted March 15, 2018 Can't you use FileOpenDialog? Then just remove the filename to get the folder directory? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 15, 2018 Moderators Share Posted March 15, 2018 trashy, My ChooseFileFolder UDF (look in my sig for the link) will let you display both files and folders but as you can distinguish between them when selected you should be able to get just a folder name even if the user actually goes for a file. M23 Earthshine 1 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...
trashy Posted March 15, 2018 Author Share Posted March 15, 2018 I was thinking use ShellExecute and open folder in explorer to view content before saving, or _FileListToArrayRec and view in a listbox. @Subz that would be another easy work around @ Melba23 I looked at it briefly already, it has a lot of features to consider, I need to spend more time with it. I was hoping for something I was already familiar with. Ran into this before and it's not that big of a deal it would just be nice to view all folder content in FileSelectFolder dialog window. Phone keeps ringing I can't even finish a simple reply. Link to comment Share on other sites More sharing options...
trashy Posted March 16, 2018 Author Share Posted March 16, 2018 Using FileSelectFolder to set directory to save multiple files. Is it possible to view not select files and not just folders. This isn't really a solution but it is a nice easy little work around, a little insurance. You could easily compare files to existing but that's more than I needed for this situation expandcollapse popup#include <File.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> Global $SaveTex = FileSelectFolder("SaveFiles", @ScriptDir) _Example() Func _Example() If @error Then Return Else $FileList = _FileListToArray($SaveTex, '*.*', 1) ;Add your file extension *.txt If $FileList = "0" Then ;Add your function here Else $ListGui = GUICreate("Contents", 200, 200, -1, -1, -1, $WS_EX_ACCEPTFILES) $Butt1 = GUICtrlCreateButton("yes", 5, 170, 65, 25) $Butt2 = GUICtrlCreateButton("no", 130, 170, 65, 25) GUICtrlCreateLabel("Selected Folder Containes these files", 10, 5, 250, 24) GUICtrlCreateLabel("Files will be Updated/Over Written", 10, 120, 250, 24) GUICtrlCreateLabel("Do You Wish to Continue", 10, 140, 250, 24) $lstmain = GUICtrlCreateList("", 0, 20, 200, 100) For $n = 1 To UBound($FileList) - 1 $File_Name = $FileList[$n] GUICtrlSetData($lstmain, $File_Name) Next GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $Butt2 GUIDelete($ListGui) Return Case $Butt1 ;Add Your Function Here GUIDelete($ListGui) Return EndSwitch WEnd EndIf EndIf EndFunc 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