0

I wrote a script in which I use a static file for example "datainput.csv"

I would like to launch an explorer session within my script to allow the user to pick a file and then be able to grab the file name within the script to process it.

I have no clue where to start..

I know how to launch Explorer, but not grab the file name.. Right now explorer launches the file external to my script.

mklement0
  • 382,024
  • 64
  • 607
  • 775
Sugata39
  • 1
  • 1
  • See https://4sysops.com/archives/how-to-create-an-open-file-folder-dialog-box-with-powershell/ – CherryDT Apr 11 '22 at 21:03
  • The linked question is about batch files, but the accepted answer also has PowerShell code. In short: Use WinForms' [`System.Windows.Forms.OpenFileDialog`](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.openfiledialog) class – mklement0 Apr 11 '22 at 21:31

0 Answers0