<# : chooser.bat :: address/from/source: https://exceptionshub.com/file-folder-chooser-dialog-from-a-windows-batch-script.html (Update 2016.3.20) :: launches a File... Open sort of file chooser and outputs choice(s) to the console :: https://stackoverflow.com/a/15885133/1683264 @echo off setlocal where /q powershell if ERRORLEVEL 1 ( echo PowerShell utility is missing echo Please install PowerShell from Microsoft echo [Press "Enter" to exit] pause > nul exit ) for /f "delims=" %%I in ('powershell -noprofile "iex (${%~f0} | out-string)"') do ( .\main\main.exe %%~I ) echo [Press "Enter" to exit] pause > nul goto :EOF : end Batch portion / begin PowerShell hybrid chimera #> Add-Type -AssemblyName System.Windows.Forms $f = new-object Windows.Forms.OpenFileDialog $f.InitialDirectory = pwd $f.Filter = "PY Files (*.py)|*.py" $f.ShowHelp = $true $f.Multiselect = $false [void]$f.ShowDialog() if ($f.Multiselect) { $f.FileNames } else { $f.FileName }