0

I'm on Windows 10. I recently changed my name and I really don't want to have to see my old name in command prompt (which is the current "user" name on my computer). Ideally, I'd like to change my user name as in how to change your user name.

But because that seems prone to error, my next thought was to simply remove the users/userName portion from the command prompt. In this question, I see how to remove the entire path. But is there a way to show only the path past users/userName? The prompt command options don't seem to provide this functionality.

1

1 Answer 1

2

What you’re seeing is the path of the current working directory. Since the home directory of your user is located at your old username, that is the directory you are seeing when you first open command prompt.

To modify the directory Command Prompt starts in, we can edit the shortcut used to launch it.

  • Search for Command Prompt in the start menu,

  • then right-click and select Open File Location. This should open the start menu folder that the shortcut is located in.

  • Right-click the Command Prompt shortcut in the folder you just opened

  • and click properties.

  • You will see in the shortcut properties that there is an entry labeled Start in: with the contents “%HOMEDRIVE%%HOMEPATH%”. These are variables containing the drive letter and path of your home directory.

  • You can replace this entry with the full path of a different directory to have Command Prompt start in that directory instead. (For example, “C:\Users\NewHomeFolder”, with the quotes)

Note that this will only take effect when CMD is started from the Start Menu shortcut we just modified

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .