Hi Harvey and Jean, 

Jean, I tried your method and it's really great that I can insert files 
like that. I had no idea. What (it seems) I then have to do is go back to 
Finder and get the file name so I can save the merged files with the file 
name as the title. Where it starts to literally hurt is I have to do this 
thousands of times because* the one folder has thousands of files that need 
to be merged, all with slightly different file names like:*

Highlights for Zen and the Art of Motorcycle Maintenance by Robert M. 
Pirsig 3.md
Highlights for Zen and the Art of Motorcycle Maintenance by Robert M. 
Pirsig 4.md
Highlights for Zen and the Art of Motorcycle Maintenance by Robert M. 
Pirsig 5.md
Highlights for Zen and the Art of Motorcycle Maintenance by Robert M. 
Pirsig 6.md
Highlights for Zen and the Art of Motorcycle Maintenance by Robert M. 
Pirsig.md     * <----- hoping for end result of 3-6 merged like so into one 
file with that title. Same for all files in the same directory with similar 
names like below:*

Highlights for Zero History by William Gibson(1).md
Highlights for Zero History by William Gibson(2).md
Highlights for Zero History by William Gibson.md

Highlights for The Hitchhiker's Guide to the Galaxy by Douglas Adams(1).md
Highlights for The Hitchhiker's Guide to the Galaxy by Douglas Adams(2).md
Highlights for The Hitchhiker's Guide to the Galaxy by Douglas Adams.md

Journal John's bday (1)
Journal John's bday

Random thought jan 7 (1)
Random thought jan 7 (2)
Random thought jan 7 (3) 
Random thought jan 7

The shell script is a little out of my knowledge, I'll do a little more 
reading. Was advised to also try:

"You can do this by putting the files in a folder and using cat *.md 
>>../somefilename.md should concatenate them to a new file one level up."

But seeing how the files are varied and slightly different like the above 
directory example. Using      *.md >>../somefilename.md   would merge 
everything into one file name? 
*Was hoping there's some way to merge everything in the folder with similar 
files names into there similar file names. *

I'm trying to get my elderly father much of my thoughts, highlights, 
journals while he's still around so I do appreciate the help 🙏

On Wednesday, August 25, 2021 at 1:21:16 PM UTC-7 jj wrote:

> Hi David,
>
> 1. Create a new empty document.
>
> 2. Then choose Menu Edit > Insert > File Contents ...
>
> 3. In the presented dialog click the bottom right "Options" button and 
> check which options you want.
>
>     [ ] Include separators
>
>     [√] Ensure line break after each inserted file  (Highly recommended)
>
> 4. Select the files you want to insert.
>
> 5. Click insert and you are done.
>
> You can repeat the operation if needed.
> HTH
>
> Jean Jourdain
> On Wednesday, August 25, 2021 at 9:40:06 PM UTC+2 Harvey Pikelberger wrote:
>
>> What about a simple shell script?
>>
>> cat file1 file2 file3 > newfile
>>
>>
>> On Aug 25, 2021, at 12:17, David J <[email protected]> wrote:
>>
>> Hello,
>>
>>
>>
>> I have thousands of Markdown files in the same folder  I'm trying to 
>> merge so my elderly father can read them. File names are like samefilename 
>> (1), samefilename (2), samefilename (3).
>> I"ve been dragging and dropping all the samefilename.md (1, 2, 3, etc) 
>> into one bbedit tab. Then typing in samefilename.txt and saving it as one 
>> text. It's still quite time-consuming with thousands of files that are 
>> split up into threes, fours, etc in one folder.
>> Is there a better way of doing this? Possible to select: samefilename 
>> (1), samefilename (2), samefilename (3)  in Finder, merge and save as 
>> Samefilename.txt back to Finder? Seems like something terminal/bbedit could 
>> do? 
>>
>> With respect, David
>>
>>
>> -- 
>> This is the BBEdit Talk public discussion group. If you have a feature 
>> request or need technical support, please email "[email protected]" 
>> rather than posting here. Follow @bbedit on Twitter: <
>> https://twitter.com/bbedit>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BBEdit Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/bbedit/4e725ba2-bbc5-408f-8342-1c356fec843cn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/bbedit/4e725ba2-bbc5-408f-8342-1c356fec843cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/65a1b22b-dd6e-48ac-adba-274a30508e66n%40googlegroups.com.

Reply via email to