New
#11
guys, you are aware that you're typing all this an a thread with very simple question?
tried this in powershell :
and again in cmd :Code:PS C:\windows\system32> cd \users\a\downloads PS C:\users\a\downloads>
seems straightforwardCode:C:\Windows\System32>cd \users\a\downloads C:\Users\a\Downloads>
PS : i never use PowerShell , guess I'm old-school lol (+ powershell is lagging, on my PC at least, cmd is instant)
As you can see for yourself, it simply doesn't work in PowerShell 5.1, and, even though I am aware that I can fix it by enclosing the ampersand sign in doublequotes, try and see what happens if the name also has a single quote (apostrophe) in it. Your argument re naming conventions is moot, when the reality is that it can't properly support NTFS names.
Yuppers.
Command Prompt, PowerShell????? Windows 11 has Terminal which opens PowerShell. Linux also has Terminal and if I recall my MacBook Pro OS X from 2010 it did too [don't know about the newer macOS].
I find that my Shift + right-click context menu options are more convenient to use instead. They can be found in the Tutorials section here on the forum (in my replies to the tutorial to open cmd here as admin and the tutorial to open PowerShell here as admin), my latest version of them uses copied shortcuts from the WinX menu so that it respects the user's customizations like colors and font selection, etc., and does so separately for each different option.
Open command window here as administrator - Add in Windows 10
- I never claimed it worked without quotation marks, so your error message is moot.
- How do you deal with spaces in mames without quotation marks?
And again, tab completion handles both your examples:
With the following directories:
Code:PS C:\...\Sandbox>gci a* -ad Directory: C:\Users\keith\Sandbox Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 4/8/2022 5:45 PM a&b d----- 4/8/2022 5:46 PM a&b'c d-r--- 1/10/2022 3:13 AM Add Comment to folder context mnu d----- 12/30/2021 10:04 PM Add Explorer Columns d----- 4/8/2022 8:00 AM Add Rating to folder
If I typesl a<tab><enter>
, here's the result:
Code:PS C:\...\Sandbox>sl '.\a&b\' PS C:\...\a&b>
And if I typesl a<tab><tab><enter>
, the single-quote-in-name is handled quite nicely:
Code:PS C:\...\Sandbox>sl '.\a&b''c\' PS C:\...\a&b'c>Work smarter, not harder!
I'm so olld-school I majored in alchemy!
I just change the background colour from blue to black and all is good
Yeah, so if it doesn't work without the quotes and it also doesn't work WITH the quotes, but you're still right about what you said re tab completion (which, BTW, I'm very sure that you are...), then exactly how many times was it again that I'm supposed to hit my tab key in situations where there's like at least a couple hundred or so folders on that list you get when you use the gci command and the folder I want happens to be positioned someplace near the middle of this list? Or do you mean to tell me that I need to use the SendKeys method of VBScript or somesuch, just to be able to 'prove' to people that PowerShell is still─regardless of what anyone chooses to believe─so much better than the command prompt?