What is the meaning of the ^ symbol in cmd.exe


  1. Posts : 18
    Windows 10 Pro 20H2
       #1

    What is the meaning of the ^ symbol in cmd.exe


    cmd.exe
    C:>^
    more?

    What is the meaning of the ^ symbol in cmd.exe
      My Computer


  2. Posts : 43,245
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    It's assuming the previous line is incomplete, and prompting you to complete it with 'more' text
      My Computers


  3. Posts : 809
    Win10
       #3

    It's a line continuation character, similar to \ in bash or C. It just lets you split long strings across multiple lines.

    It's mainly for readability in batch files when you have very long commands.

    The following are the same:
    Code:
    C:\>dir c:\windows\system32\drivers /ad
    
    C:\>echo The quick brown fox jumps over the lazy dog
    The quick brown fox jumps over the lazy dog
    Code:
    C:\>dir ^
    More? c:\windows\^
    More? system32\^
    More? drivers\^
    More? /ad
    
    C:\>echo The quick brown ^
    More? fox jumps ^
    More? over the ^
    More? lazy ^
    More? dog
      My Computer


  4. Posts : 3,279
    Win10
       #4

    As all the above, also check out to see the meanings of other Special Characters.

    Syntax : Escape Characters, Delimiters and Quotes
    Quotes, Escape Characters, Delimiters - Windows CMD - SS64.com
      My Computers


  5. Posts : 18
    Windows 10 Pro 20H2
    Thread Starter
       #5

    Is it possible to escape the function of the ^ symbol,
    when the ^ symbol occurs in a program argument e.g. a password?

    C:> psftp user@hostname -pw abdc^1234
      My Computer


  6. Posts : 1,801
    10 Home 64-bit | v22H2 | Build - 19045.3930
       #6

    das10 said:
    As all the above, also check out to see the meanings of other Special Characters.

    Syntax : Escape Characters, Delimiters and Quotes
    Quotes, Escape Characters, Delimiters - Windows CMD - SS64.com
    SS64's a good site it has bailed me out a few times.
      My Computers


  7. Posts : 3,279
    Win10
       #7

    Again from the same SS64 page quoted above; (try C:> psftp user@hostname -pw abdc^^1234)


    ^^
    Escape the Escape character

    The escape character can be used to escape itself ^^ (meaning don’t treat the first ^ as an escape character), so you are escaping the escape character.
      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 08:31.
Find Us




Windows 10 Forums