Benches macOS

5

Copying multiple binary files to one sing…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Can someone tell me how to copy multiple binary files to one single file (to merge them)?

In Windows, I can do this by using the following command:

copy /b file1 + file2 file3

Is there a similar way to do this in OS X?

Message was edited by: miflo

5 replies

Sign in or join Beachball Help to reply.

  1. 0

    Limnos

    Imported from the Apple Support Forums via the Wayback Machine 🔗

  2. 0

    thomas_r.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    If you just need to concatenate the files, you can do this easily in Unix. Since Mac OS X is Unix, just open the Terminal (in /Applications/Utilities/) and do something like this:

    cat file1 file2 file3 > newfile

    Note that, rather than typing the path to each file, you can just drag a file to the Terminal window and it'll insert the file path and name in the command. Of course, you could also just "cd" to the folder where the files live and type their names.

    Message was edited by: Thomas A Reed

  3. 0

    miflo

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks for the quick replies!

    Can I use this to merge two or more ".ts-files" (=transport stream recorded by DVB Receiver after the "FAT32-file-splitting" into 4GB parts)?

    Note: ".ts" is binary, which means it works when I do that in Windows using the command mentioned above.

    Message was edited by: miflo

  4. 0

    Limnos

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    That's beyond my pay grade to answer. 🙂

    I do know that many media files often have things added onto the beginning or end, or both, and simply gluing them together will not make a longer playable file. But, as I said, I have no experience with that file format.

  5. 0

    miflo

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I edited my last post...

    .ts files are always binary (without any header). Merging them using the Windows-command mentioned above works.

    I'll try that tomorrow.

    Thank you all!

    Message was edited by: miflo