Results 1 to 13 of 13
  1. #1
    2 Star Lounger
    Join Date
    Apr 2009
    Posts
    173
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Clipboard --desktop shortcut clear clipboard, win xp pro

    Hi -

    Trying to create a desktop shortcut to clear contents of clipboard. I tried using

    cmd /c “echo off | clip”

    didn't work. Anything else I can try?

    Thank you.

  2. #2
    Super Moderator
    Join Date
    Jun 2011
    Location
    New England
    Posts
    4,753
    Thanks
    171
    Thanked 652 Times in 575 Posts
    Did you download clip.exe to your Windows folder as mentioned for XP in the final paragraph of this article?: Create a Shortcut or Hotkey to Clear the Clipboard in Windows

    Bruce

  3. #3
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,199
    Thanks
    48
    Thanked 987 Times in 917 Posts
    clip.exe is a Vista / 7 command, not XP.
    Don't know of a command line program for XP.

    cheers, Paul

  4. #4
    2 Star Lounger
    Join Date
    Apr 2009
    Posts
    173
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Thanks, Bruce. I tried that. In Windows the download appears as 'Clip' I ran it, nothing - clipboard still have entries. I then sent it to Desktop, entered %SystemRoot%\system32\shell32.dll in Start Target shows C:\WINDOWS\CLIP.EXE

    Nothing cleared. I obviously don't know how to proceed....................

  5. #5
    Super Moderator
    Join Date
    Jun 2011
    Location
    New England
    Posts
    4,753
    Thanks
    171
    Thanked 652 Times in 575 Posts
    This works for me in XP (mode in Virtual PC) after downloading clip.exe:

    Put clip.exe in C:\Windows\system32 (just easier to have it in the same place as cmd.exe).

    Make shortcut target C:\WINDOWS\system32\cmd.exe /c echo off | clip (no quotes). I don't think Start in matters.

    %SystemRoot%\system32\shell32.dll is only for a different icon if you wish. After "Change Icon", paste that in "Look for icons in this file" then hit enter to view icons for selection.

    Bruce
    Last edited by BruceR; 2012-04-03 at 15:10.

  6. #6
    2 Star Lounger
    Join Date
    Apr 2009
    Posts
    173
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Bruce - after I downloaded the file clip.exe and moved it from desktop to system32 (it appears as CLIP...application, 6 KB). I created the desktop shortcut, pasted into Target C:\WINDOWS\system32\cmd.exe /c echo off | clip

    Start in is: C:\WINDOWS\system32.
    I don't think this is deserving of more of your time. And, I wonder how much time would be gained over merely clicking Clear All on the Clipboard.............

    I do thank you.

  7. #7
    Super Moderator
    Join Date
    Jun 2011
    Location
    New England
    Posts
    4,753
    Thanks
    171
    Thanked 652 Times in 575 Posts
    Quote Originally Posted by mipendance View Post
    Bruce - after I downloaded the file clip.exe and moved it from desktop to system32 (it appears as CLIP...application, 6 KB). I created the desktop shortcut, pasted into Target C:\WINDOWS\system32\cmd.exe /c echo off | clip
    ... and? ...and? ... when you double-click the shortcut the clipboard is not cleared?

    Oh well, you're probably right to forget a shortcut and live with a couple of extra clicks.

    Bruce

  8. #8
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Hi All,

    This intrigued me so I played for a while. It seemed everyting I could do from the command window would leave some special character on the clipboard. Finally the lights went on and I tried this and it works, at least on my Win 7 64Bit SP-1 machine.
    %systemroot%\system32\cmd.exe /c clip < d:\path\empty.txt
    Where: empty.txt is a zero length text file created by opening notepad and just saving the empty file.

    Hope it works for you.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  9. #9
    2 Star Lounger
    Join Date
    Apr 2009
    Posts
    173
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Correct- not cleared....

  10. #10
    2 Star Lounger
    Join Date
    Apr 2009
    Posts
    173
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Thank you for responding, RG. Since I have XP,32Bit,SP3, I will forgo attempting this. Appreciate your responding.

  11. #11
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,199
    Thanks
    48
    Thanked 987 Times in 917 Posts
    To send an empty string to clip.exe you need a fullstop immediately after the echo. And you should always use the environment variable comspec to run the Command Prompt.
    %comspec% /c echo. | clip

    cheers, Paul

  12. #12
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Paul,

    I had tried that and just retried it with your command line {good point about using %comspec%} but Ctrl+v still pasted a crlf {blank line} into Notepad so the clipboard was not completely cleared.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  13. #13
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,199
    Thanks
    48
    Thanked 987 Times in 917 Posts
    I think CRLF is effectively cleared. ;-))

    BTW, none of this is of any use if you have a key logger on your machine.

    cheers, Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •