@GETFILE[d:\path\filename[,filter[,title]]]: Pops up a dialog box to select a file. d:\path\filename specifies the initial directory and filename shown in the dialog, and may include wildcards. Returns the full path and name of the selected file or an empty string if the user selects "Cancel" or presses Esc. The optional second parameter specifies the file extension to use. You can specify multiple extensions by separating them with semicolons. For example, %@getfile[c:\windows,*.exe;*.btm] lets the user select from .EXE and .BTM files only.


The parameters must be in quotes if they contain white space or special characters. On an LFN drive, the returned filename may contain white space or other special characters. To avoid problems which could be caused by these characters, quote the returned name before you pass it to other commands. See the notes under Variable Functions for additional details.


If filename is quoted, the returned filename will also be quoted (if necessary).


@GETFILE accepts an optional third parameter to set the title of the dialog box.


If you're looking for directories, use @GETFOLDER.




echo %@getfile[*]




echo %@getfile["%windir",*.exe]