SetClip

Command line tool which puts any arguments you give it into the clipboard. It can also copy a text-file into the clipboard.

Comparison to Clipboard SET command and scripting support:

Directory Opus 9 added a built-in Clipboard SET command which mades SetClip obsolete in many cases, but not all.

Newer versions of Opus also allow you to read and set the clipboard via scripting.

SetClip is still useful if you want to:

  • Change the clipboard from outside of Opus
  • Put a file (rather than command-line arguments) into the clipboard (without using scripting)
  • Split the clipboard text into multiple lines (without using scripting)
  • Append to the clipboard instead of replacing it (without using scripting)
  • Clear the clipboard (without using scripting).

In the most common case, where you just want to set the clipboard to a string of text, the built-in Clipboard SET command, or scripting support, do the job and avoid installing and running an external program.

Also, if you just want to copy the selected filenames to the clipboard then you can do that with both SetClip.exe and Clipboard SET but Opus has some dedicated commands for doing it which should be more convenient than both. See the FAQ, HOW TO: Copy selected filenames to the clipboard for more information.

Usage

  • Usage 1: SetClip [-l] [-a] [--] <arg1> <arg2> ...

The arguments will be put in the clipboard with each one on a new line.
Use quotes around arguments containing spaces that you want on the same line.
Use "" for a blank line.
Give the -l argument to output everything on one line instead.
Give the -a argument to append to any existing clipboard text.
Give the -- argument if you want to actually put "-l", "-f", "-e" or "-a" into the clipboard.

  • Usage 2: SetClip -f [-l] [-a] [--] <filename>

The file will be read and put into the clipboard as text.
Give the -l argument to avoid adding a return when appending to existing text.
Give the -a argument to append to any existing clipboard text.

  • Usage 3: SetClip -e

The clipboard will be emptied.

Example:

  • Clear the clipboard, then copy the contents (not the names!) of the selected text files to the clipboard.

(This assumes that SetClip.exe is in /dopusdata/User Data, which is a folder in your Opus configuration area which you can put your own things into, and which will be backed up when you back up the configuration. Type that path into Opus and it will take you to the proper folder on your system.)

Function Type: MS-DOS Batch

@runmode hide
"/dopusdata/User Data/SetClip.exe" -e
"/dopusdata/User Data/SetClip.exe" -f -a {filepath$}

Ready for pasting to your toolbar:

<?xml version="1.0"?>
<button display="both">
	<label>Contents to Clipboard</label>
	<tip>Copies the contents of the selected text files to the clipboard</tip>
	<icon1>#clipcopy</icon1>
	<function type="batch">
		<instruction>@runmode hide</instruction>
		<instruction>&quot;/dopusdata/User Data/SetClip.exe&quot; -e</instruction>
		<instruction>&quot;/dopusdata/User Data/SetClip.exe&quot; -f -a {filepath$}</instruction>
	</function>
</button>

Author: Leo Davidson

Link, with latest version and more details: http://www.pretentiousname.com/miscsoft/index.html#SetClip

Local copy of the program and source: SetClip1201.zip (59.3 KB)

For those who wish to set up the Set Clip buttons, check this thread.

It shows how to create folders out of file names both in the Source and Destination Listers

Thanks to all that helped me in this.

SoSweet