Cannot get to 'downloads' folder in Command prompt (admin)

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 30,611
    Windows 10 (Pro and Insider Pro)
       #11

    guys, you are aware that you're typing all this an a thread with very simple question?
      My Computers


  2. Posts : 989
    Microsoft Windows 10 Home
       #12

    AndreTen said:
    guys, you are aware that you're typing all this an a thread with very simple question?
    Sometimes the best parts of a question are the tangents that arise in the answers. That's why I still miss the threaded conversations of mewsgroups...
      My Computer


  3. 3nd
    Posts : 860
    Zorin Lite
       #13

    tried this in powershell :
    Code:
    PS C:\windows\system32> cd \users\a\downloads
    PS C:\users\a\downloads>
    and again in cmd :

    Code:
    C:\Windows\System32>cd \users\a\downloads
    
    C:\Users\a\Downloads>
    seems straightforward



    PS : i never use PowerShell , guess I'm old-school lol (+ powershell is lagging, on my PC at least, cmd is instant)
      My Computer


  4. Posts : 1,203
    11 Home
       #14

    KeithM said:
    As opposed to "State of the Art" batch?!?!?

    Also, an ampersand does't require the -LiteralPath parameter, just quotation marks:

    Code:
    PS C:\...\Sandbox>gci i* -ad
    
    
        Directory: C:\Users\keith\Sandbox
    
    
    Mode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    d-----          4/8/2022   7:52 AM                I&Ignore&For&Best&Practices
    d-----         11/1/2020  11:09 AM                IE Search Suggestions
    d-----          4/7/2021   3:51 AM                iniFun
    
    
    PS C:\...\Sandbox>sl "I&Ignore&For&Best&Practices"
    PS C:\...\I&Ignore&For&Best&Practices>
    PS C:\...\I&Ignore&For&Best&Practices>
    Perhaps your test path had $ or [ ] characters???

    Of course, tab completion is easier. Typing sl i<tab><enter> gets you there as well.

    If you're working at the console and require the -LiteralPath parameter, use the -lp alias instead

    But all of this can be avoided if you pay attention to widely-accepted best practices:




    There's a learning curve to any language, but once we're familiar with it, we tend to forget the frustration and confusion that accompanied our initial efforts.
    ☮☮☮ Peace ☮☮☮
    Cannot get to 'downloads' folder in Command prompt (admin)-posh.png

    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.
    AndreTen said:
    guys, you are aware that you're typing all this an a thread with very simple question?
    Yuppers.
      My Computers


  5. Posts : 1,203
    11 Home
       #15

    3nd said:
    PS : i never use PowerShell , guess I'm old-school lol (+ powershell is lagging, on my PC at least, cmd is instant)
    I only use it every once in a blue moon, mainly to avoid the extra time and effort that it would take to convert some certain commands/snippets. lol
      My Computers


  6. Posts : 14,022
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #16

    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].
      My Computers


  7. Posts : 1,203
    11 Home
       #17

    Berton said:
    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
      My Computers


  8. Posts : 989
    Microsoft Windows 10 Home
       #18

    hdmi said:
    Cannot get to 'downloads' folder in Command prompt (admin)-posh.png

    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.

    • 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 type sl a<tab><enter>, here's the result:
    Code:
    PS C:\...\Sandbox>sl '.\a&b\'
    PS C:\...\a&b>

    And if I type sl 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!
      My Computer


  9. Posts : 2,800
    Windows 7 Pro
       #19

    I just change the background colour from blue to black and all is good
      My Computers


  10. Posts : 1,203
    11 Home
       #20

    KeithM said:
    • 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 type sl a<tab><enter>, here's the result:
    Code:
    PS C:\...\Sandbox>sl '.\a&b\'
    PS C:\...\a&b>

    And if I type sl 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!
    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?
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:38.
Find Us




Windows 10 Forums