How to change the directory to program files using Powershell? -


i open c:\program files\r\r-3.2.0\bin\rscript.exe. trying change directory. figured error in opening program files. following code

cd program files\r\r-3.2.0\bin  error: positional parameter cannot found accepts argument files 

unlike command.com/cmd.exe, powershell follows more consistent rules , in failing case program , files\r..bin parsed 2 separate arguments, second invalid in context (as cd accepts single non-named argument).

to fix use quotes, eg.

 cd "c:\program files" 

with quotes parsed string value supplied single argument (the string not include quotes, again unlike cmd.exe rules).


fwiw, cd alias set-location. run get-help cd details on how can used - include optional (and named) parameters does support.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -