Tip: Use CLIP.EXE to manage clipboard in CMD


  1. Posts : 1,009
    Windows 7 RC 7100 32bit/64bit
       #1

    Tip: Use CLIP.EXE to manage clipboard in CMD


    In many cases in this forum and elsewhere, you are asked to submit screenshots of command prompt commands and their printed results.

    Sometimes though, you might need the text result to be editable, rather than a jpeg image. Many users are not familiar with the QuickEdit mode of Command Prompt, or the result is too big (e.g. a /help result), so you cannot easily copy the text from the cmd window.

    A tool introduced from Vista, Clip.exe, also available in W7, can make your life easier on this.
    So when you are asked to post a screenshot of e.g. bcdedit command, instead of the screenshot you can post the actual cmd text results.

    To do so, just type the command in command prompt followed by | clip (|=pipe)

    example:

    bcdedit | clip

    Now your clipboard contains the bcdedit command's results.You can just paste it anywhere.

    Other useful examples (for debuggin purposes):

    powercfg /query | clip

    ipconfig | clip

    dir c:\windows\system32 | clip

    etc

    Limneos
      My Computer


  2. Posts : 130
    Windows 7
       #2

    Good tip. Another easy way to get cmd.exe results to text is to simply put a carrot ">" after the command with the location of the new text file after it.
    Like...
    ipconfig > c:\users\public\documents\ipconfigresults.txt

    It's useful with scheduled tasks/batch files
      My Computer


  3. Posts : 1,009
    Windows 7 RC 7100 32bit/64bit
    Thread Starter
       #3

    hdjunkie said:
    Good tip. Another easy way to get cmd.exe results to text is to simply put a carrot ">" after the command with the location of the new text file after it.
    Like...
    ipconfig > c:\users\public\documents\ipconfigresults.txt
    Indeed, but this doesn't copy it to the clipboard. To get it copied, you will then need to open the ipconfigresults.txt, select all , copy. Clip.exe places it in the clipboard without having to open a file.
      My Computer


  4. Posts : 130
    Windows 7
       #4

    I never said it did. I don't use need/use that function
      My Computer


  5. Posts : 3,141
    Vista Ult 64 bit Seven Ult RTM x64
       #5

    Nice tip, limneos. Thanks.

    Gary
      My Computer


  6. Posts : 22,814
    W 7 64-bit Ultimate
       #6

    This is great, thanks Limneos.

    My bcdedit output as an example.


    Code:
     
     
    Windows Boot Manager
    --------------------
    identifier              {bootmgr}
    device                  partition=D:
    description             Windows Boot Manager
    locale                  en-US
    inherit                 {globalsettings}
    default                 {current}
    resumeobject            {9222e001-28c4-11df-8694-d031a9396882}
    displayorder            {ntldr}
                            {current}
                            {aec762e2-86c1-11de-8d82-c6496531d197}
    toolsdisplayorder       {memdiag}
    timeout                 30
    Windows Legacy OS Loader
    ------------------------
    identifier              {ntldr}
    device                  partition=D:
    path                    \ntldr
    description             Earlier Version of Windows
    Windows Boot Loader
    -------------------
    identifier              {current}
    device                  partition=C:
    path                    \Windows\system32\winload.exe
    description             Windows 7
    locale                  en-US
    inherit                 {bootloadersettings}
    recoverysequence        {9222e003-28c4-11df-8694-d031a9396882}
    recoveryenabled         Yes
    osdevice                partition=C:
    systemroot              \Windows
    resumeobject            {9222e001-28c4-11df-8694-d031a9396882}
    nx                      OptOut
    Windows Boot Loader
    -------------------
    identifier              {aec762e2-86c1-11de-8d82-c6496531d197}
    device                  partition=D:
    path                    \Windows\system32\winload.exe
    description             Vista 64-bit Ultimate
    locale                  en-US
    inherit                 {bootloadersettings}
    osdevice                partition=D:
    systemroot              \Windows
    resumeobject            {aec762e3-86c1-11de-8d82-c6496531d197}
    nx                      OptOut
      My Computer


  7. Posts : 6
    7, XP, osx, ios
       #7

    Or pipe it to the clipboard


    limneos said:
    hdjunkie said:
    Good tip. Another easy way to get cmd.exe results to text is to simply put a carrot ">" after the command with the location of the new text file after it.
    Like...
    ipconfig > c:\users\public\documents\ipconfigresults.txt
    Indeed, but this doesn't copy it to the clipboard. To get it copied, you will then need to open the ipconfigresults.txt, select all , copy. Clip.exe places it in the clipboard without having to open a file.
    Or instead of redirecting to a file you could pipe it into the clipboard: ipconfig | clip.exe

    You might have to provide the full path to clip.exe, whatever that is.
      My Computer


 

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

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