Compatible with Windows 7, 8, 10, and 11.
Note: Some antivirus software may falsely detect the download as a virus. This can happen any time you download a new executable and may require extra steps to whitelist the file. In testing, no issues were encountered using Windows Defender on Windows 10 and 11, but a false positive “virus detected” occurred on Windows Server 2022.
FileDialog is a command line file dialog tool for use in Windows scripts. It can provide a:
Filedialog.exe is typically run from within a script (batch file, VBScript, PowerShell, etc.).
Running FileDialog with no parameters will display the built-in help:
Usage: FileDialog DialogType [~DialogTitle] [StartPath] [DialogFilter] [Multi] [Retro]
DialogType must be one of: Open Save Folder
Parameters may be specified in any order and are not case sensitive
Prefix DialogTitle with ~ Example: ~"Select an image file"
Parameters must be quoted if they contains spaces
If StartPath is quoted, omit or double up trailing backslash
Forward slashes may be used in place of backslash without any need to double up
Relative paths are supported (e.g. .\MyStuff or ..\MyStuff)
StartPath may also be one of: Documents Libraries OneDrive Public ThisPC UserProfile
Multiselect is supported for File Open and Folder dialogs and is OFF by default.
The Retro parameter will give you old school Open, Save, and Folder select dialogs
Microsoft's modern dialogs insist on going to Libraries for Documents, Pictures, and so on
Use the Retro parameter to avoid Libraries
Environment variables are supported. Be sure to quote them if they contain spaces.
Example: FileDialog Open C:\Users "*.ini|*.ini" Multi
Example: FileDialog Open C:\Users\ "*.ini|*.ini" ~"Select an INI file"
Example: FileDialog Save "C:\Users" "Text files (*.txt)|*.txt"
Example: FileDialog Save "C:\Users\\" "Text files (*.txt)|*.txt"
Example: FileDialog Open "C:\Users" "Image Files(*.PNG;*.JPG)|*.PNG;*.JPG|All files (*.*)|*.*"
Example: FileDialog Open UserProfile
Example: FileDialog Folder ThisPC
Example: FileDialog Open "%UserProfile%\Pictures" Retro
Example: FileDialog Open "C:\Users\Public\Documents" Retro
Example: FileDialog Open "%LocalAppData%"
At start, ? is written to HKCU\Software\FileDialog
On Cancel, '' is written to HKCU\Software\FileDialog
Upon user selection, a single, unquoted item is written to HKCU\Software\FileDialog Default
Selected items are written in CSV format to the console and HKCU\Software\FileDialog ItemList
Selected items are also written as a multi-string to HKCU\Software\FileDialog ItemListM
Example 1:
FileDialog Open "%UserProfile%\Pictures\Misc" "Image Files(*.PNG;*.JPG)|*.PNG;*.JPG|All files (*.*)|*.*"
Example 2:
FileDialog Open "%UserProfile%\Documents" "Text Files|*.txt"
Example 3:
FileDialog Open "%UserProfile%\Documents" "Text Files|*.txt" Retro
Example 4:
FileDialog Folder Downloads
Example 5:
FileDialog Folder "%UserProfile%\Downloads" Retro