Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a custom percent (%) shortcut like %appdata%?

Is it possible? If so, how? Can it be done in CMD?

Existing shortcuts examples :

%appdata%
%temp%
%userprofile%
like image 275
Guillaume Chevalier Avatar asked Oct 21 '25 12:10

Guillaume Chevalier


1 Answers

These are environment variables and you can set your own, yes.

You can set them within a script or at cmd prompt with set, and you can make "global" environment variables by going to System Properties/Advanced and clicking the Environment Variables button. Variables added there will be available to all applications. If you have existing cmd windows open, though, they won't get the global variables - you will need to open new windows to make these variables available.

like image 91
Mark Avatar answered Oct 23 '25 03:10

Mark