Is there any shortcut for desktop in windows command prompt ? (like %WINDIR% for windows directory)
I want to use cd %DESKTOP% for example.
Asked
Active
Viewed 1.9k times
3
LotPings
- 7,231
Mohsen Zia
- 133
1 Answers
7
Closest thing to that (without you setting your own Variable) is
cd %UserProfile%\Desktop
Beyond that you can set your own Variable:
SET DESKTOP=%USERPROFILE%\Desktop
And then cd %Desktop% will bring you to x:\Users\YourUserName\Desktop
For Command Line options to do the same:
setx desktop "%userprofile%\desktop" for User Variable
setx desktop "%userprofile%\desktop" /M for Computer/System-wide Variable
Darius
- 5,394
setx desktop "%userprofile%\Desktop"– Darius May 07 '18 at 05:59