When performing commands with the Windows Command Prompt of Windows File Explorer, have you ever been instructed to “Go to your User Profile” or “Open your temporary file folder” without a clear indication of how to do this?
Windows %shortcut% commands to the rescue!
There are common Windows Environment Commands that can be helpful to reach various locations on your computer quickly in order to begin diagnosing and fixing computer related problems, including viruses.
Why not just manually “cd” or navigate to the location we need?
- Over the years, different versions of Windows have used different directories (folders) for files. Windows has built in %shortcuts% to help users to locate files regardless of which version of Windows. In this manner, learning these shortcuts means you can locate the files you needed quickly regardless of the version of Windows being worked on.
- A Windows computer username is unique to the person that set up the computer. A username might be a personal name, a job position, the name of a pet, the name of the company, etc. This means that potentially, every Windows computer username is essentially unique. You can imagine the time saving of using a shortcut rather than looking for the active username.
- Not only is every username potentially unique, but one computer can have several usernames, for different co-workers, different family members, or even different security levels.
- Usernames that contain spaces must be encapsulated inside of quotes. %shortcuts% does this for you without the need to know when or how to do this.
Using Windows Command Box and %shortcuts%
Our first technique is to use the Windows Command Box and our shortcuts to quickly navigate around the computer. This may be possible using the Windows File Manager as well, which is discussed later.
- In the bottom left corner of Windows, click [Start] or or .
- Begin typing and type: cmd
- Press [Enter] to run the Command Prompt program.
In the Windows Command Box, the following Windows Environment Commands will save you time. Type the commands to quickly navigate to various locations throughout the computer.
Changes directory (folder) to the currently logged in User Profile. Normally this is “C:\Users\[User]” where “[User]” is the current user. The %userprofile% folder contains folders such as Desktop, Documents, Downloads, Favorites, Music, Pictures, Videos.
Changes the “HomeDrive” directory (folder) to the Windows folder. Normally this is C:\Windows.
Changes directory (folder) to the User’s AppData folder. Normally this is C:\Users\[User]\AppData\Roming. The AppData folder is hidden by default.
Changes directory (folder) to the User’s Local AppData folder. Normally this is C:\Users\[User]\AppData\Local.
Changes directory (folder) to the User’s Program Files folder. Normally this is C:\Program Files.
Changes directory (folder) to the temporary files folder. Normally this is C:\Users\[User]\AppData\Local\Temp.
The commands above assume you are on the “HomeDrive”, which is typically C:. If you are on a different drive, such as D: and issue the above commands, it doesn’t change the directory (folder) on D:, but rather, it changes them on the C:. Upon returning to the C: you will see that the location was updated.
- C:\>d: In the example below, you can see we start on the c:\ in the root folder. We change to the D:
- D:\Shared>cd %userprofile% The command to change to the %userprofile% is issued.
- D:\Shared>c: After the command has been issued, we can see we’re still on D:\Shared. We change to the C:
- C:\Users\Earth> We can see the command did change the “HomeDrive” to the %userprofile% folder as requested.
List of all Environment Variables
%shortcuts% are based on Environment Variables which are unique for each computer. So how do you learn about all the Environment Variables?
- Open a Command Prompt (as described above)
- Type and then press enter: set
You’ll be rewarded with a lot of information. Some of the information can be used as %shortcuts%. For example, you will see “ProgramFiles=C:\Program Files” in the list. Above we used “cd %programfiles%”. You can probably guess that we can use “cd programfiles(x86)” to change to the C:\Program Files (x86) folder.
Windows File Explorer (aka “My Computer”, “My PC”) %shortcuts%
The %shortcut% commands can also be used in the Windows File Explorer by simply typing or pasting in the %shortcut% and pressing enter.
- Start Windows File Explorer
- Click inside the “Search Bar” or “Location Bar”
- Type or paste in a short cut.
- You will arrive at the requested location
Advanced Info – Registry User Shell Entries
Where does Windows store the Windows Environment Variables?
User folders: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Public folders: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
The above is not a comprehensive list of all the Windows Environment Commands, but are the commands commonly needed in part to repair a computer problem.
We serve computer users anywhere in the US that have virus infections using a remote connection over the Internet for immediate service.
I enjoy delivering expert quality and value to all my customers. In fact, I work extra hard so every virus removal is a 5 star experience!
Latest posts by Roger Whittaker (see all)
- Amazon Assistant Virus Removal – Updated October 2017 - October 4, 2017
- Mac Virus Removal – Updated October 2017 - September 29, 2017
- PC Virus Removal – Keeping Your Computer Safe from Viruses - August 4, 2017