Can I combine TextEdit files w/o copying and pasting?

I’ve kept daily journal entries in Text Edit. Is there a way I can combine them into one file without cutting and pasting? I’m using TextEdit 1.1 on Mac OS El Capitan Version 10.11.6.


Solution 1:

Credit:https://discussions.apple.com/thread/2242153?tstart=0

You can achieve this by opening terminal and typing cd [path of the folder where your journals are located] you should replace [ ] with the the folder where your diary entries are written , just drag and drop the folder into the terminal window.(Remember to hit space after typing cd) Then you can merge all the text edit files into one by typing cat file1.txt file2.txt file3.txt > file4 The file1.txt, file 2.txt and so on will be your diary entries so if you have more just type the name of the file followed by a space and the > symbol will merge all the documents into one file4.txt you can change the name as per your concern.

Solution 2:

By default, TextEdit creates Rich Text formatted files, e.g. filename.rtf, not Plain Text formatted files, e.g. filename.txt and as such, if the default is in play, then you cannot use cat as suggested in the other answers. This is because cat doesn't understand Rich Text formatting in order to concatenate the files.

If the documents are default TextEdit Rich Text formatted, then you'll need to use the textutil command:

textutil -cat rtf file1.rtf file2.rtf -output newfile.rtf