Pages

Wednesday 8 June 2016

Environment Variables: shortcuts to Windows folders

Oooo! How's this for a handy shortcut by Ed Bott, of TechRepublic?

Ed advises that you can save at least half a dozen keystrokes by using - what he calls - Windows "environment variables".

Ed provides the example that, if we wanted to go to our user profile in File Explorer, we might start typing the path C:\Users\[our user name], but if we use environment variables, we can shortcut that. The environment variables contain a 'reserved name', bracketed by percentages, which provide a shortcut to specific system folders. We access them by keying the name into the address bar or search box, and hitting Enter. For example:
%userprofile%
...and that takes us to our profile.

Ed is kind enough to provide a list of some useful examples:
  • %localappdata% The hidden folder in your user profile where Windows apps store your data
  • %windir% The folder containing Windows system files; usually C:Windows
  • %public% A special user profile that contains folders for Documents, Downloads, Music, Pictures, and Videos, intended for sharing on a home network
  • %temp% or %tmp% The normally hidden folder where Windows and apps can store files necessary for one-time tasks
Ed finishes up by saying "Some people write these variables using mixed case (%ProgramFiles%, for example) to make them easier to read. But they're not case sensitive, so skip the Shift key if you want".

Sam

No comments :

Post a Comment

Thanks for your feedback. The elves will post it shortly.