Monday 15 October 2018

command line - In Windows Explorer, why can we create a folder or file with the percent (%) symbol, if the percent symbol is used for existing variables?


  1. Go to Windows Explorer, and create a folder/directory named %systemdrive%, %windir%, or any other existing variable.

  2. Open a command prompt, and go to the folder you just created.


You can't, because there are percent (%) symbols in the folder name, confusing the command prompt, because the percent symbol is used for existing variables.


Escaping the percent (%) symbol with two percent symbols (%%) does not work, so DavidPostill's answer is wrong:


Command prompt window, with a bit of the Explorer desktop showing So, in Windows Explorer, why can we create a folder or file with the percent (%) symbol, if the percent symbol is used for existing variables?

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...