Given that the dialog is called folder BROWSER dialog I suspect the answer is no, but is there a way to get a folder browser that allows text input of path, rather than forcing browse? I need to select a folder (and only a folder) from a network share, and the whole browse process in the dialog is a bit... lacking. Ideally I would like to be able to put \\servername in the text box and see the list of folders update appropriately. Is that something that exists in WinForms or some other built in mechanism? Or is that one that requires building my own UI?
Asked
Active
Viewed 272 times
1 Answers
0
You can go old school:
$comObj = New-Object -ComObject Shell.Application
$dir = $comObj.BrowseForFolder(0, $title, 0 , $startPath);
# UNC path ^^^^^^^^^^
if ($dir) {
$dir.Self.Path;
} else {
'Nothing selected'
}

kuujinbo
- 9,272
- 3
- 44
- 57
-
1that does allow me to specify in advance the starting folder, but I want that to be user input, and dynamic input while in the dialog. In a perfect world OpenFileDialog would have a filter for just folders, but that doesn't make much sense with the name. I fear I am a bit of an edge case. ;) – Gordon Jun 18 '18 at 22:30
-
1@Gordon - my bad, misunderstood the question. Looks like to you need to roll your own. Maybe a text box in combination with a [TreeView](http://www.wpf-tutorial.com/treeview-control/treeview-data-binding-multiple-templates/) – kuujinbo Jun 18 '18 at 23:02