Portable console utility to get clipboard text to STDOUT or file

Discuss anything related to portable freeware here.
Post Reply
Message
Author
RJ_STN
Posts: 6
Joined: Sat Nov 10, 2018 12:40 am

Portable console utility to get clipboard text to STDOUT or file

#1 Post by RJ_STN » Wed Feb 06, 2019 10:21 am

Hi everyone!

I am searching a small console utlity that can prints out clipboard text data (types: CF_Text, CF_Unicodetext, CF_oemtext) rith to STDOUT.
Neither powerful NirCmd, nor InsideClipboard can do that.
Only close mthod is command 'nircmd clipboard saveclp "c:\temp\1.clp"' but it saves to file ALL clipboard data (and I can't properly read it from batch script).

May be, someone knows such kind of software?
Something like:
'clipboard.exe get cf_text' - in stdout prints text
'clipboard.exe get cf_text > file.txt' - prints data to file file.txt

billon
Posts: 685
Joined: Sat Jun 23, 2012 4:28 pm

Re: Portable console utility to get clipboard text to STDOUT or file

#2 Post by billon » Wed Feb 06, 2019 10:59 am

@RJ_STN:

winclip

User avatar
Midas
Posts: 4606
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Portable console utility to get clipboard text to STDOUT or file

#3 Post by Midas » Wed Feb 06, 2019 1:02 pm

Yori (viewtopic.php?t=24254) is an alternative CLI that includes a CLIP command to manipulate the Windows clipboard from the console. YMMV.

Code: Select all

Clip 0.98

Manipulate clipboard state including copy and paste.

CLIP [-license] [-e|-h|-p|-t] [filename]

   -e             Empty clipboard
   -h             Copy to the clipboard in HTML format
   -p             Paste the clipboard
   -t             Retain only plain text in the clipboard


User avatar
Midas
Posts: 4606
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Portable console utility to get clipboard text to STDOUT or file

#5 Post by Midas » Wed Feb 06, 2019 2:32 pm

Yep, unlike Yori's, Windows Clip can't paste...

Code: Select all

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.

RJ_STN
Posts: 6
Joined: Sat Nov 10, 2018 12:40 am

Re: Portable console utility to get clipboard text to STDOUT or file

#6 Post by RJ_STN » Tue Feb 12, 2019 4:11 am

billon wrote:
Wed Feb 06, 2019 10:59 am
@RJ_STN:

winclip
Thanks! Winclip really works and do what I need.

Post Reply