6

What I'd want is a tool where, every time I copy something from anywhere, to append it to a text file, either within such tool, or to a custom file.

I know there are several clipboard managers, which keep history of whatever you cut/copy, and then you can't choose from the history and copy again. I in fact use "Ditto".
But that is not exactly what I need.

To clarify, let me use an example.

Let's say, I need to copy several names from a student list students.txt (S), and then paste them into another file, let's call it class_b.txt (C).

The direct solution is to copy a name from S, go to C, and paste it, go again to S, copy another non consecutive student, go again to C, and paste it. Repeat.

It is obviously tedious and unpractical.

What I'd like is to be able to keep in S, and every time I copy something, and without anything else, to append it somewhere. Then, at the end, I'd have every student neatly ordered, from which I can then copy them all together, and paste them wherever I want.

It would also be nice to be able to choose if I want to append them in new lines or just directly before or after the current text.

i.e. copying a,b,c in that order could result in either one of 4 options:

//append at the end, in new line:

a
b
c

//append at the end, same line:

abc

//append at the beginning, same line:

cba

//append at the beginning, new line:

c
b
a

Is there any such tool?

  • 1
    Well described, Diego (+1). As I doubt there's such a tool, just naming a substitute: there are editors using tabs for multiple open files, which might at least ease the process (Notepad++ is an example for such on Windows). Good luck for the "real ones"! – Izzy Nov 12 '14 at 8:04
2

AutoHotKey

AutoHotKey is an excellent program to automate routine tasks on Windows, and this one is no exception. What you want can be done using one of these scripts:

Append at the end

#NoEnv
#Persistent
#SingleInstance

OnClipboardChange:
  FileAppend, %Clipboard%`n, D:\AppendAtEnd.txt
return

Explanation:

Watches for any changes in the clipboard then appends the contents as text to a file D:\CopiedText.txt.

`n = Linefeed. Remove to prevent the script from inserting new lines after each append


Append at the beginning

Appending data at the beginning of a file is a longer process, it involves reading the orginal file, deleting it afterwards, then writing the clipboard and the file content to a new file:

#NoEnv
#Persistent
#SingleInstance

OnClipboardChange:
  FileRead, Contents, D:\AppendAtBeginning.txt
  FileDelete, D:\AppendAtBeginning.txt
  FileAppend, %Clipboard%`n, D:\AppendAtBeginning.txt
  FileAppend, %Contents%, D:\AppendAtBeginning.txt
return

Both

Make sure not to run both of the above scripts simultaneously if you have them accessing the same file. You could either use different file names or combine them into one script that writes the clipboard content into two files, one in each order:

#NoEnv
#Persistent
#SingleInstance

OnClipboardChange:
  FileAppend, %Clipboard%`n, D:\AppendAtEnd.txt
  FileRead, Contents, D:\AppendAtBeginning.txt
  FileDelete, D:\AppendAtBeginning.txt
  FileAppend, %Clipboard%`n, D:\AppendAtBeginning.txt
  FileAppend, %Contents%, D:\AppendAtBeginning.txt
return
1

Try KwikText. You drag and drop text into a template, then click and paste into any document. Text blocks can be of any size, from single lines to multiple paragraphs. Material can be labeled and edited in the template. It's free, so worth a try. The website has videos that show how to use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.