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.



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.

| improve this answer | |
  • Yes indeed a good answer here and you can improve on this but joining all files together and then sorting the final output list in alphabetical order by using cat file1.txt file2.txt file3.txt > file4.txt && sort -u file4.txt -o file4.txt – MitchellK Oct 15 '17 at 14:00

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
| improve this answer | |

Not from the TextEdit app but you can from the terminal. You can use the cat command and pipe file1 to a new file. Then use the cat command again on file2 and append to the new file. You may already know this but if not I can show you explicitly how to do it.

| improve this answer | |
  • Thank you for answering my question. I don't know about the cat command. Can you tell me more about it or tell me where to find out? Thank you so much! – Martha Oct 15 '17 at 1:54
  • cat is a unix command that will print contents of a file. To do what you want you could do the following; cat file1 > newfile then cat file2 >> newfile. This will combine fille1 and file2 into 1 newfile. – jmh Oct 15 '17 at 2:00
  • You can read the manual on most commands using the ‘man’ command. I.e. ‘man cat’ – John Keates Oct 15 '17 at 2:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .