Copy Text to Clipboard Using Command Line in Windows
If you’re doing work at the command line on your Windows box, it’s sometimes useful to copy the output of a command to the clipboard, but who wants to try and scroll and click to use copy and paste? Here’s how to do it the easy way.
Note: For the purposes of our exercise, we’ll be using the built-in clip utility in Windows 7 or Vista—if you are using Windows XP, you can download clip.exe from Microsoft, just make sure to save the file in the Windows directory.
Method: 1
clip < filename.txt ( Eg: ‘clip<C:\WINDOWS\ie8.txt’ )
Method:2
echo password| clip
(here ‘password’ will copy 2 clipboard, when u paste- will show as ‘password’)
N'joy
Renjith R
Comments
Post a Comment