I'd like to do something like this:
- On the command line, copy a file to the Windows clipboard
- In Windows Explorer, paste the file/files into a current location
Is there a simple tool to do this, in cygwin or elsewhere?
I'd like to do something like this:
Is there a simple tool to do this, in cygwin or elsewhere?
Try the clip
utility that comes with Windows.
CLIP
Description:
Redirects output of command line tools to the Windows clipboard.
This text output can then be pasted into other programs.
Parameter List:
/? Displays this help message.
Examples:
DIR | CLIP Places a copy of the current directory
listing into the Windows clipboard.
CLIP < README.TXT Places a copy of the text from readme.txt
on to the Windows clipboard.
clip < filename
then Windows explorer disables paste
as the clipboard only contains the file contents, not whatever an explorer copy
would capture.
Feb 13, 2013 at 3:54
/dev/clipboard
, rather than invoke a Windows utility program. You can also read from /dev/clipboard
, which means you can use it in all sorts of exciting *nix-y pipelines and workflows. That doesn't answer the OP's question either, though!
I'm using this tool https://github.com/roryyorke/picellif
. This is a Windows commandline tool. Put it into your PATH
in Cygwin. I actually use it along with winpty
like this in .bashrc
alias cf='winpty picellif'
With Cygwin:
user@computer ~$ echo "foo bar" |clip
user@computer ~$ cat /dev/clipboard
foo bar