Video - Users Variables (11 min.)


Presentations videos

Demo videos

What are favorites advanced settings?

Advanced Settings give more control on how favorites are launched.

  • Launch with this application: Normally, folders and FTP sites are opened with Windows Explorer (or your custom file manager), documents are open with their default application and links are accessed with your default browser. With the advanced setting Launch with this application, you can choose to launch your favorite with another application. See Placeholders, below.
 
 
  • Start in: This advanced setting available for Application favorites allows to set the default working directory for the application. Take note that not all applications will use this setting. See Placeholders, below.
 
  • Encode FTP URL: When you specify user name and password for a FTP favorite, these values are added to the URL and sent to the FTP server. When enabled, this options make sure login name and password are properly encoded. Some application (like Total Commander) may prefer the values to be sent without encoding. For these apps, uncheck the option.Take note that this encoding is not encrypting. It does not prevent the password from being saved in the settings file and sent on Internet in clear text. Be cautious if your password protects sensitive data!
 
  • Sound played when launching the application: (starting with v9.1) Set the file name or the codes of the sound to play. The sound is played immediately after the command to open the menu item or the group is executed. You can play a sound file, a system sound or your own custom sound sequence.See also: Can I play a sound when I launch a favorite?
Placeholders

You can use location placeholders in Launch with this applicationParameters and Start In fields. These placeholders can be replaced with the location or part of the full path and file name of the favorite's location (e.g. "{LOC}"), the folder where the QAP menu was opened (e.g. "{CUR_LOC}") and the file selected when the menu was opened (e.g. "{SEL_LOC}"). These placeholders also have variants for based the full location, for example "{NAME}", "{DIR}", etc.

You can also insert the placeholder "{Clipboard}" that will be replaced wioth the content of the Windows Clipboard.

See Can I insert values in favorites location or parameters using placeholders? for all the details.

Can I insert values in favorites location, parameters or snippets using placeholders?

The features described in this page require Quick Access Popup v9.2 or more recent.

You can insert values from placeholders (like {Clipboard}) in Snippets content and in favorite's Location, Parameters and Start In fields (for all types of favorites supporting these options). Placeholders contents are  based on:

  • the current content of your Windows Clipboard;
  • the favorite's own location;
  • the current folder in Windows Explorer.
  • the selected item in Windows Explorer folders and files list.

Clipboard

You can use the Windows Clipboard to insert variable pieces of text in your snippets or in various paths in favorites dialog box. When you launch your favorite, QAP automatically replaces the placeholder "{Clipboard}" (without the quotes) with the current content of the Windows Clipboard.

For example, in the following Snippet example, the Clipboard's content will be inserted in the second line between the arrows. If the Clipboard contains an image or binary data, nothing is inserted.

In this second example, the content of the clipboard is sent as parameter. The content of the Parameters zone is expanded in the preview zone named Current parameters with expanded placeholders at the bottom of the dialog box. It shows what would be the parameter sent to the application with the current Clipboard's content.

The example above is a working example for browsers applications Chrome, Firefox and Internet Explorer. This parameter will automatically launch your browser to search for the text contained in your Windows Clipboard. Make sure you include the quotes correctly to include all word in the search. If you want to search for an exact expression, add surrounding quotes like this: "? \"{Clipboard}\"" (the backslash "\" acts as an escape character for quotes inside the parameter.

If you use the browser Microsoft Edge, simply enter in the Parameters zone {Clipboard} (no quotes) for a normal search or "{Clipboard}" (with quotes) to search for an expression.

Favorite's location

In an Application favorite, you can re-use the favorite's location (or part of it) in the Start In or the Parameters fields. For example "{DIR}" in the the Start In field will be replaced with the favorite's location folder. The following examples are based on the favorite's location "C:\MyFolder\MyFile.exe":

  • {LOC} for full location ("C:\MyFolder\MyFile.exe")
  • {NAME} for file name ("MyFile.exe")
  • {DIR} for directory ("C:\MyFolder")
  • {EXT} for extension ("exe")
  • {NOEXT} for file name without extension ("MyFile")
  • and {DRIVE} for drive letter. ("C")

In the following example, an Application favorite named My App with data file will be open with a parameter based on the application's folder.

The Parameters field below includes the "{DIR}" placeholder with a file name "Client.DAT". The second red box shows that the "{DIR}" placeholder will be expanded taking into account the applications' location from the above screen capture.

Multiple parameters can be inserted in this field. Each parameter must be enclosed between quotes. Also, do not forget that, even if there is only one parameter, a parameter must be enclosed between quotes if it contains spaces.

Current folder in Explorer

You can also use the placeholders "{CUR_LOC}", "{CUR_DIR}", etc. that will be replaced with the current location of your Explorer window (window under the mouse pointer or active Explorer window when you open the menu). Let's say you have various folders with the same subfolders structure, for example:

C:\Client-1
C:\Client-1\Contract
C:\Client-1\Contract\Draft
C:\Client-1\Contract\Signed
C:\Client-2
C:\Client-2\Contract
C:\Client-2\Contract\Draft
C:\Client-2\Contract\Signed
etc.

You can create favorites of type Folder or Document that will be opened in a given subfolder under the current (or active) folder in Windows Explorer. For example, a favorite Folder named Current Client's Signed Contract would open the Signed subfolder for Client-1 if you are in the C:\Client-1 folder, or for the second client if you are in C:\Client-2, etc.

Create a favorite folder with the Folder (path) {CUR_LOC}\Contract\Signed in the Basic Settings tab:

When you will launch this favorite, QAP will get the current folder (in Windows Explorer, Directory Opus or Total Commander) and will replace the placeholder {CUR_LOC} with the detected current location. To avoid "folder not found" errors, make sure you have a strictly constant subfolders structure and that you always use this favorite in the appropriate folder (a "root" client folder in our example).

Current location placeholder can be inserted in location for favorites of types Folder, Document and Application.

You call also use these placeholder variations:

  • {CUR_LOC} for full location
  • {CUR_NAME} for file name
  • {CUR_DIR} for directory
  • {CUR_EXT} for extension
  • {CUR_NOEXT} for file name without extension
  • and {CUR_DRIVE} for drive letter

Note: Remember that, in QAP, the relative path conventions .\ for current folder or ..\ for parent folder are processed relatively to QAP's working directory, not to the current directory in your Explorer window.

See also this page for more info about the Start In and Parameters settings: Can I pass the current folder as parameter to an application launched with QAP?.

Selected file or folder in Explorer

Similar to using the context menu with Right-Click but with much more flexibility, you can use QAP to pass the location of the selected file (or part of it) to a given favorite application or script.

In the following example, when launching the application favorite MyApp, QAP will replace  the "{SEL_NAME}" placeholder in the Parameters zone with the file name of the item under the mouse pointer when you open the QAP menu with the Middle Mouse Button or the selected file in the current file manager window if you open the menu with the keyboard shortcut (Windows + W).

Open the QAP menu by pressing the Middle Mouse Button while the mouse pointer is over the desired file and launch the favorite. In the following example, the favorite application is showing a dialog box with, as parameter, the name of the selected file "quickaccesspopup-9_1_2.zip".

These placeholders work in Windows Explorer and Directory Opus. They are not available in Total Commander at this time.

Available placeholders for the selected file are:

  • {SEL_LOC} for full location
  • {SEL_NAME} for file name
  • {SEL_DIR} for directory
  • {SEL_EXT} for extension
  • {SEL_NOEXT} for file name without extension
  • and {SEL_DRIVE} for drive letter
Placeholders in Snippets

Since v9.2, placeholders can be inserted in Snippets content. Also, if you use the Prompt before pasting option, placeholders in the Snippet prompt will also be expanded with the content of the Clipboard or of one of the locations placeholders.

Can I create custom user variables and use them in file paths or snippets?

Video demo

The features described in this page require QAP v9.2 or more recent.

User variables can be of great help in various situations:

  • network drive users having to enter long (and often cryptic) paths to reach their content can shorten these paths using convenient variable names;
  • if you use a Shared menu of type Personal on two different computers sharing the same cloud drive (like Dropbox), user variables like {Dropbox} allow you to have fix favorites paths in your menu even if your cloud drive is at different locations on your two systems;
  • this is the same for teams using shared menus and cloud drives; favorites in shared menus for folders or files on a cloud drive will work regardless the cloud drives location on each team member PCs;
  • if you plan to move your files to another location, you can use a variable to avoid having to edit all the favorites after you moved the files to the new location;
  • etc.

To manage your user variables, open the Options window in the More tab and click the User Variables button. In this window, enter your user variables, one by line. Each line must start with the variable name between curly brackets (e.g. {MyVariable}), followed by the equal sign = and the variable content (e.g. {MyVariable}=MyContent).

For example, if one line contains {OurSharedFolder}=S:\ThisFolder, the placeholder {OurSharedFolder} will be replaced by S:\ThisFolder in a favorite paths when launching it or in snippet's content when pasting it.

In the following example, the user variable {OneDrive} is inserted in the favorite folder {OneDrive}\Project. If the variable contains C:\Users\Standard\OneDrive as in the previous example, the Project folder will be opened in C:\Users\Standard\OneDrive\Projects.

Note 1: The first time you launch it, QAP tries to create user variables for these commonly used cloud drives if they are found on the system: {Dropbox}, {OneDrive}, {GoogleDrive} and {iCloudDrive}.

Note 2: If you need to insert a user variable "as-is" in a text snippet, precede the variable's opening bracket with a backtick, eg.: `{Dropbox}.

See also: Can I insert values in favorites location or parameters using placeholders?