How to add custom user variables to Windows to load folders faster

Martin Brinkmann
May 6, 2014
Tutorials
|
3

This guide explains how to set up custom variables in Windows that you can use to open or reference folders faster.

Windows makes use of several preconfigured variables like %tmp% or %userprofile% that you can use when you are Windows Explorer, on the command line, and anywhere else on the system.

What many Windows users do not know that it is possible to add custom variables easily to the system as well, so that you can open folders faster or save time when you are referencing them as you do not need to type that much.

To test how those variables work, open Windows Explorer and type %tmp% in the address bar of the file explorer. You should be take to the temporary file folder of the user account you are logged in.

Some common variable names that exist by default in Windows are the following ones (assuming that Windows is installed on C:, that the username is Martin, and that the operating system is Windows 7. Directories may differ depending on the version of Windows).

  • %ALLUSERSPROFILE% opens C:\ProgramData
  • %APPDATA% loads c:\Users\Martin\AppData\Roaming
  • %PROGRAMFILES% loads "c:\program files"
  • %USERPROFILE% opens c:\Users\Martin\
  • %TEMP% displays the contents of C:\Users\Martin\AppData\Local\Temp
  • %WINDIR% loads c:\windows

To set up your own custom variables, do the following

  1. Open the System control panel. Probably the easiest way to do so is to press Windows-Pause on your keyboard.
  2. Locate the advanced system settings link and click on it. This opens the system properties window.
  3. Click on the environment variables button.
  4. Here you find listed user variables and system variables.
  5. Click on new underneath user variables.
  6. Add a name for the variable, e.g. music, images, videos, code or anything else that you want to later use to open or reference the folder.
  7. Add the full path as the variable value. If the path has a space in it, enclose it in quotation marks. Valid examples are d:\mp3 or "d:\mp3 collection", but not d:\mp3 collection.
  8. You can add as many variables as you like.
  9. Once you are done, click on ok and restart the PC.

Once Windows has started again, open Windows Explorer and test the new variables that you have just added to your system.you need to enclose the name with % to indicate that it is a variable, e.g. %music% or %code%.

If something is not working properly, repeat the steps above but instead of adding a new variable, edit the one that is not working.

You can use those variables in many different situations, from loading the folder quickly in Windows Explorer to combining it with file names on the command line and using it in programs.

Summary
Article Name
How to add custom user variables to Windows to load folders faster
Description
How to set up custom variables in Windows to access folders faster.
Author
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Nossy Drelich said on August 5, 2022 at 3:16 am
    Reply

    You do do this with RapidEE and save yourself the typing.

    https://www.majorgeeks.com/files/details/rapid_environment_editor_(rapidee).html

  2. X said on May 6, 2014 at 11:36 pm
    Reply

    This can be done programmatically using the SETX command (with /M for system variables)

  3. GK said on May 6, 2014 at 7:30 pm
    Reply

    I always do this for the Desktop folder .:)

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.