James
asked on
Using the clip utility with special characters
I'm trying to copy text to the clipboard from the command line. If I try something simple like:
ECHO test | CLIP
it works fine and puts the word test in the clipboard. My problem is that I have a special character (specifically an ampersand) in the text I want to copy and it makes the clip utility choke:
ECHO http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=1ZV300F20358346597 | CLIP
If I try the same text without the ampersand, it works fine so I know it's the ampersand that is causing the problem.
I tried using quotation marks like this:
ECHO "http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=1ZV300F20358346597" | CLIP
That gets rid of the error but the quotation marks get copied to the clipboard, too.
Any ideas?
Thanks in advance.
ECHO test | CLIP
it works fine and puts the word test in the clipboard. My problem is that I have a special character (specifically an ampersand) in the text I want to copy and it makes the clip utility choke:
ECHO http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=1ZV300F20358346597 | CLIP
If I try the same text without the ampersand, it works fine so I know it's the ampersand that is causing the problem.
I tried using quotation marks like this:
ECHO "http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=1ZV300F20358346597" | CLIP
That gets rid of the error but the quotation marks get copied to the clipboard, too.
Any ideas?
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER