Re: Terminal command to concatenate all files in a folder
If doing a cat command to get one large rtf file presents problems use the textutil command to first convert all rtf to txt files. Command: textutil -convert txt *.rtf XB -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
Re: Terminal command to concatenate all files in a folder
Text files would work. I have concatinated .mp3 ifles before, but wrote a batch file to do it under DOS, or the CMD command interpreter at least. RobH. - Original Message - From: "Pamela Francis" To: Sent: Thursday, March 26, 2015 3:21 PM Subject: Re: Terminal command to concatenate all files in a folder Hi, Can you do the same thing with a straight text file? Or a downloaded audio file? I have an audio file of a book that was separated by chapter. It came to me as a zip file. Can I somehow merge those files into a folder to save to my desktop? I need to use this book in order to study for some advancement in my job. Pam Francis On Mar 26, 2015, at 9:36 AM, Todor Fassl wrote: You can do what you asked with the cat command: cat file*.rtf > bigfile.rtf I am not sure that will give you a valid rtf file though. Each rtf file is going to have header and footer info and the concatenation of all of them might not be valid. You might be able to use the cat command to concatenate all the files, open the resulting file with textedit and then save it wiping out the redundant header/footer info. Maybe. > On 03/26/2015 08:35 AM, Phil Halton wrote: > I have a folder containing around 120 .rtf files and I want to concatenate > them into one large file. They are sorted and listed in the order in which > I wish to have them joined together. I know I could do this one at a time > by some such command as file1+file2+file3, etc. > Is there a one-shot command that will join them all together? -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
Re: Terminal command to concatenate all files in a folder
Todor, You’re confusing my original message with a hijacker asking another question that is only peripherally related to the topic at hand. I wish people would either start their own threads or be clear that there’ question is not related to the original message. > On Mar 26, 2015, at 11:41 AM, Todor Fassl wrote: > > I'm not sure what you mean by wanting to "merge those files into a folder". > Your original question was how to merge many files into one big file. That's > why I said, "You can do what you asked" But that might not be what you want. > > Most likely, if you just want to listen to a book that came to you as a zip > file, yu probably want to unzip it at the command line and then browse to it > in File Browser. > > Anyway, yes, the command I gave works to concatenate files of all types. But > you will get the same problem with many file types as I spoke of with rtf. > The files will have header and footer information and simply concatenating > them at the command line will give you a broken file. Plain text files will > definitely work. So will mp3 files surprisingly. So you can do the following > and it will probably work: > > cat file*.mp3 > bigfile.mp3 > > On 03/26/2015 10:21 AM, Pamela Francis wrote: >> Hi, >> Can you do the same thing with a straight text file? Or a downloaded audio >> file? I have an audio file of a book that was separated by chapter. It came >> to me as a zip file. Can I somehow merge those files into a folder to save >> to my desktop? I need to use this book in order to study for some >> advancement in my job. >> >> Pam Francis >> >> On Mar 26, 2015, at 9:36 AM, Todor Fassl wrote: >> >> You can do what you asked with the cat command: >> >> cat file*.rtf > bigfile.rtf >> >> I am not sure that will give you a valid rtf file though. Each rtf file is >> going to have header and footer info and the concatenation of all of them >> might not be valid. You might be able to use the cat command to concatenate >> all the files, open the resulting file with textedit and then save it wiping >> out the redundant header/footer info. Maybe. >> >>> On 03/26/2015 08:35 AM, Phil Halton wrote: >>> I have a folder containing around 120 .rtf files and I want to concatenate >>> them into one large file. They are sorted and listed in the order in which >>> I wish to have them joined together. I know I could do this one at a time >>> by some such command as file1+file2+file3, etc. >>> Is there a one-shot command that will join them all together? > > -- > You received this message because you are subscribed to the Google Groups > "MacVisionaries" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to macvisionaries+unsubscr...@googlegroups.com. > To post to this group, send email to macvisionaries@googlegroups.com. > Visit this group at http://groups.google.com/group/macvisionaries. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
Re: Terminal command to concatenate all files in a folder
First, just try cat *>bigfile. Big file being what every you want. That will most likely give you what you want, but you may have to do more. Unix seems to deal with RTFs pretty well, but it’s possible that there may be problems. On Mar 26, 2015, at 8:35 AM, Phil Halton wrote: I have a folder containing around 120 .rtf files and I want to concatenate them into one large file. They are sorted and listed in the order in which I wish to have them joined together. I know I could do this one at a time by some such command as file1+file2+file3, etc. Is there a one-shot command that will join them all together? -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout. Barry Hadder bhad...@gmail.com -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
Re: Terminal command to concatenate all files in a folder
I'm not sure what you mean by wanting to "merge those files into a folder". Your original question was how to merge many files into one big file. That's why I said, "You can do what you asked" But that might not be what you want. Most likely, if you just want to listen to a book that came to you as a zip file, yu probably want to unzip it at the command line and then browse to it in File Browser. Anyway, yes, the command I gave works to concatenate files of all types. But you will get the same problem with many file types as I spoke of with rtf. The files will have header and footer information and simply concatenating them at the command line will give you a broken file. Plain text files will definitely work. So will mp3 files surprisingly. So you can do the following and it will probably work: cat file*.mp3 > bigfile.mp3 On 03/26/2015 10:21 AM, Pamela Francis wrote: Hi, Can you do the same thing with a straight text file? Or a downloaded audio file? I have an audio file of a book that was separated by chapter. It came to me as a zip file. Can I somehow merge those files into a folder to save to my desktop? I need to use this book in order to study for some advancement in my job. Pam Francis On Mar 26, 2015, at 9:36 AM, Todor Fassl wrote: You can do what you asked with the cat command: cat file*.rtf > bigfile.rtf I am not sure that will give you a valid rtf file though. Each rtf file is going to have header and footer info and the concatenation of all of them might not be valid. You might be able to use the cat command to concatenate all the files, open the resulting file with textedit and then save it wiping out the redundant header/footer info. Maybe. On 03/26/2015 08:35 AM, Phil Halton wrote: I have a folder containing around 120 .rtf files and I want to concatenate them into one large file. They are sorted and listed in the order in which I wish to have them joined together. I know I could do this one at a time by some such command as file1+file2+file3, etc. Is there a one-shot command that will join them all together? -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
Re: Terminal command to concatenate all files in a folder
Hi, Can you do the same thing with a straight text file? Or a downloaded audio file? I have an audio file of a book that was separated by chapter. It came to me as a zip file. Can I somehow merge those files into a folder to save to my desktop? I need to use this book in order to study for some advancement in my job. Pam Francis On Mar 26, 2015, at 9:36 AM, Todor Fassl wrote: You can do what you asked with the cat command: cat file*.rtf > bigfile.rtf I am not sure that will give you a valid rtf file though. Each rtf file is going to have header and footer info and the concatenation of all of them might not be valid. You might be able to use the cat command to concatenate all the files, open the resulting file with textedit and then save it wiping out the redundant header/footer info. Maybe. > On 03/26/2015 08:35 AM, Phil Halton wrote: > I have a folder containing around 120 .rtf files and I want to concatenate > them into one large file. They are sorted and listed in the order in which I > wish to have them joined together. I know I could do this one at a time by > some such command as file1+file2+file3, etc. > Is there a one-shot command that will join them all together? -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
Re: Terminal command to concatenate all files in a folder
You can do what you asked with the cat command: cat file*.rtf > bigfile.rtf I am not sure that will give you a valid rtf file though. Each rtf file is going to have header and footer info and the concatenation of all of them might not be valid. You might be able to use the cat command to concatenate all the files, open the resulting file with textedit and then save it wiping out the redundant header/footer info. Maybe. On 03/26/2015 08:35 AM, Phil Halton wrote: I have a folder containing around 120 .rtf files and I want to concatenate them into one large file. They are sorted and listed in the order in which I wish to have them joined together. I know I could do this one at a time by some such command as file1+file2+file3, etc. Is there a one-shot command that will join them all together? -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
Terminal command to concatenate all files in a folder
I have a folder containing around 120 .rtf files and I want to concatenate them into one large file. They are sorted and listed in the order in which I wish to have them joined together. I know I could do this one at a time by some such command as file1+file2+file3, etc. Is there a one-shot command that will join them all together? -- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at http://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.