PS C:\Documents and Settings\$joe.TEST> cd\
The term ‘cd\’ is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again
.
At line:1 char:3
+ cd\ <<<<
Information about joeware mixed with wild and crazy opinions...
PS C:\Documents and Settings\$joe.TEST> cd\
The term ‘cd\’ is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again
.
At line:1 char:3
+ cd\ <<<<
[joeware – never stop exploring… :) is proudly powered by WordPress.]
function cd\ {Set-Location \}
But I understand, had same problem to get used to it 😉
+1 – That “feature” annoys the crap out of me.
Hi,
I think you need to do it like this:
PS C:\Documents and Settings\$joe.TEST>cd \
agreed, it is fixed in v2
Seems to work for me just fine. Must be that “legacy” software you insist on using :0)
Deano: Shush, what are you running on now? Like Windows 9 or something?
Glenn: Yep knew about the cd[space]\. cd\ and cd.. are burned into my finger’s DNA at this point as it has been consistent in the shells I work on going back over 20 years.
Additionally I hate that there is perceptable delay to come back with that error message… Open a command prompt and type cd<> or something else nonsensical and watch how fast that comes back, your finger hasn’t even left the ENTER key yet and it is telling you you dorked it up…
My pet peeve:
Windows PowerShell
Copyright (C) 2006 Microsoft Corporation. All rights reserved.
PS H:\> cd /d c:\temp
Set-Location : A parameter cannot be found that matches parameter name ‘c:\temp’.
At line:1 char:3
+ cd <<<
I’ve long gotten used to changing the drive letter and the directory with a single CD command.
There is some precedent for this. In cmd.exe, tab completion doesn’t work with cd\ either.
Hmm I have to disagree with you Scott, I would argue tab completely is working perfectly in that situation. Tab completion is parameter driven and parameters to cmd are separate tokens separated by space (as adjusted by quotes). So when the tab completion logic kicks in when you have cd\ there should it think to expand from the \ or should it take cd\ as the token to try and expand? Create a folder called CD and a subfolder under it called something like hello and then from the folder that has the cd folder you created type cd\[TAB]
cd\ and cd.. when used by themselves are specially handled by cmd.
Granted they could put special handling into tab completion and say, well if this is the first param and a \ is present, expand but I think I prefer how it was done.
cd /d c:\temp
is easier
cd c:\temp
@joe
“d[space]\. cd\ and cd..”
all work in v2