Just the same as title, I want to change the default path of node.js command prompt from c:\user\"my username" to C:\nodejs, but not to affect that one(I mean default path) of windows command prompt.
Does anyone know if it is possible?
Node.js command prompt default path pic
Yes, it is possible to change default path of node.js command prompt, when you launch it, then (Windows case)
change the default path in the row which looks like
if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%"
with your path. It could be for example
if "%CD%\"=="%~dp0" cd /d "c://MyDirectory/"
if you mean to change directory once when you launched "Node.js command prompt", then execute the following command in the Node.js command prompt:
cd c:/MyDirectory/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With