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.
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.

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
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
clip.exe is a Vista / 7 command, not XP.
Don't know of a command line program for XP.
cheers, Paul
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....................
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 14:10.
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.
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.![]()
Correct- not cleared....
Thank you for responding, RG. Since I have XP,32Bit,SP3, I will forgo attempting this. Appreciate your responding.
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
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.![]()
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