4

As we can go to the temp folder by typing %temp% in the run Window.Is there any way to make this command work for our folders as well

eg-If we have a folder say SUPER then i want this folder to open when i give %SUPER% in the run window

3 Answers 3

7

%temp% is referencing an environment variable.

These are defined in Control Panel / System / Advanced / Environment Variables for XP and in Windows 7 you can just search for "environment" in the start menu and choose Edit Environment Variables.

Add the variable name you want in the name field, without the percentage signs. Add the folder you want to open in the value field.

If this is just for a user, then apply it at the user level, or use system if it is for all users.

4

Sure.

To set the variable %SUPER%, just execute this command:

set SUPER=C:\foo\bar\SUPER

To set this variable automatically each time you open a terminal, go to

Control Panel -> System -> Advanced System Settings -> Environment Variables...

and create a user variable (for your account) or a system variable (for all accounts) with name SUPER and value C:\foo\bar\SUPER.

2

Yes you can.

Actually you need to create a new enviroment variable for your folder then you can access it quickly using your trick.

Let's say for C:\USER\SUPER:

  1. Right click on My Computer > Properties > Advance System Settings > Advance tab > Environment Variables...

  2. Add your new variable, you can choose the name whatever you want, the value should be your full path of the folder. This case: SUPER and C:\USER\SUPER

  3. Access it by typing %SUPER%

This works on my Windows 7, not sure on other versions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .