Command Pick List Pick File...

The PickFile command enables you to pick a file on your computer.

It displays a pick list with files located in a specified root folder.

Upon picking a file of the pick list, the path of the picked file is stored in a specified variable.

This variable can then be used to perform an action on that picked file.

Subfolders of the root folder can also be displayed in the pick list.

Picking a subfolder enables you to navigate to the folder where you want to pick a file. In some ways you are using the expansion tables as a file browser!

When selecting the Pick File... menu item, the following dialog

Pick File Command Input

will help you specify the PickFile command parameters:

foldername

Name of the root folder from which you want to start to browse.

filemask

Filemask to specify a pattern the picked file should match.

showSubFolder

Indicates if subfolders should be displayed in the pick list.

The file you want to pick may be located in a child folder of the root folder. Picking subfolders enables you to navigate to the folder where you want to pick a file.

showFileExtensions

Indicates if file extensions should be shown in the displayed pick list.

variableName

Name of the variable that will contain the picked file.

The specified variable can then be referenced in subsequent expansion text or commands with its name using the following syntax:

$(name)

Example: Launch a Desktop Shortcut

The following expansion:

{PickFile}
foldername = "%userprofile%\Desktop"
filemask = "*.lnk"
showSubfolders = "n"
showFileExtensions = "n"
variableName = "picked-file"
{/PickFile}
{Launch}$(picked-file){/Launch}

enables you to pick a shortcut from your Desktop and then launch the corresponding application.