Questions tagged [folderbrowserdialog]

FolderBrowserDialog is a class in the System.Windows.Forms.CommonDialog namespace

Prompts the user to select a folder.

Docs

280 questions
1
vote
0 answers

Setting the 'RootFolder' property on a folderBrowserDialog prevents folder expansion

Windows Forms application using VS2022 CE. I have a 'browse' button for selecting the folder of interest, as shown in the following snippet: private void btn_Browse_Click(object sender, EventArgs e) { …
1
vote
0 answers

FolderBrowserDialog does not open after first time

I open the FolderBrowserDialog via a ajax call to seelct a path on the machine. The dialog opens and works perfect at the first time but when I make the same call again the dialog does not open unless I rebuild the application. I used OpenFileDialog…
user34534
  • 21
  • 5
1
vote
1 answer

How to prevent the FolderBrowserDialog description from wrapping?

We are using a WinForms FolderBrowserDialog in a WPF/C# Application using some and we have a sentence we have added to the Description property on the FolderBrowserDialog (I'm going to change the text for the sake of the screenshot but our message…
Josh
  • 730
  • 7
  • 14
1
vote
1 answer

Pass a c# Object Value To Powershell as Variable

The following code includes 2 buttons resulting in a folderbrowserdialog(1,2), result of 1 is supposed to be passed as $source and the second as $destination. The last button is supposed to run the PS Script private void…
1
vote
1 answer

Powershell FolderBrowserDialog behaving differently from shell to ise

When I run the below code in Powershell ISE everything runs fine, but when I run it from Powershell Shell I get a lot of errors about icons. [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") |Out-Null $foldername =…
adalton
  • 13
  • 2
1
vote
3 answers

How do I open a folder browser dialog from a PowerShell script?

I have a PS1 script which opens a FolderBrowserDialog: open-folder.ps1 Add-Type -AssemblyName System.Windows.Forms Push-Location $FileBrowser = New-Object System.Windows.Forms.FolderBrowserDialog -Property @{ ShowNewFolderButton = $true …
MHebes
  • 2,290
  • 1
  • 16
  • 29
1
vote
2 answers

BrowseForFolders doesn't display on top

I'm writing PS Script and following block of code shows dialogbox below windows forms gui. $btn1 = New-Object Windows.Forms.Button $btn1.Text = "Wybierz folder projektowy" $btn1.Location = New-Object System.Drawing.Point(170,140) …
aarbuzik
  • 15
  • 4
1
vote
1 answer

WPF folder browser dialog that shows external devices and can navigate to user-given folder path

I have a WPF application where the user must choose a folder for an operation. I achieve this by opening a folder browser dialog when he clicks a button. I want the dialog to both list external devices, like connected smartphones, and have a textbox…
Tessaract
  • 1,047
  • 7
  • 24
1
vote
0 answers

Select a local folder with bokeh

I'm looking for a way to select a folder with bokeh in python. I know I can select a file by importing Fileinput, is there a similar way for directory?
Alberto B
  • 315
  • 1
  • 2
  • 10
1
vote
2 answers

C# WPF FolderBrowserDialog - Unable to retrieve the root folder

I am using the FolderBrowserDialog to select the Folder where user can save file. While opening the folder browse dialog, application get crashed and raised below exception. System.InvalidOperationException: Unable to retrieve the root folder. …
Hiren Lad
  • 55
  • 5
1
vote
1 answer

Powershell: Folder Browser/File Browser path

I am kind of new to Powershell and just want to check if something is possible. I understand there is a way to allow me to get the path of an individual file and even multiple files with the OpenFile dialog. I also understand there is a way for…
1
vote
2 answers

How to create a folder having some subfolders, in a root folder selected by the user?

i have this code to create subfolders in the path the user choose FolderBrowserDialog folderBrs = new FolderBrowserDialog(); if (folderBrs.ShowDialog() == DialogResult.OK) { System.IO.DirectoryInfo dir = new…
1
vote
0 answers

Folder to an application

I apologize upfront for butchering the verbiage. Here is what I am trying to figure out. I work with projects that currently use windows folders to store project files (500-1000) per project. The current interaction with a project is clicking…
JohnS
  • 11
  • 1
1
vote
1 answer

Opening winforms FolderBrowserDialog via web socket connection from C# class library

I need to open a winforms FolderBrowserDialog from class library. We are calling the method via web socket from js and i need to open a FolderBrowserDialog in that method in order to get path and do some operations inside the folder. I tried both…
Cansın Memiş
  • 55
  • 2
  • 10
1
vote
2 answers

How do I specify the initial path shown in the FolderBrowserDialog using PowerShell

Function Get-Folder($initialDirectory) { [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")|Out-Null $foldername = New-Object System.Windows.Forms.FolderBrowserDialog $foldername.Description = "Select a folder" …
software is fun
  • 7,286
  • 18
  • 71
  • 129