Merge multiples MP3 files into one

This last week someone sent me a CD with fifty 60 second tracks (it was a presentation that someone inexplicably saved as fifty separate tracks instead of one contiguous fifty minute block) that they wanted ripped into a single MP3. Ripping is easy with CDex and my initial google search left with with Audacity, which looked promising but I couldn’t figure out how to merge multiple MP3 files into a single file (using Audacity that is). Finally, I came across this little gem on binarybonsai.com, where a commenter mentioned that you can use the DOS copy command to append one files (or multiple files) to one another, creating one big file from many. Syntax is as follows:

> copy /b file1.mp3 file2.mp3 file3.mp3 end_result.mp3

which combines file1.mp3, file2.mp3 and file3.mp3 into end_result.mp3. The /b switch indicates that you’re copying binary files.

35 thoughts on “Merge multiples MP3 files into one”

  1. Funny idea, but I tried anyway! Instead of the old dos “copy” I used the unix “cat” command with pipe:

    cat file1 >> newfile
    cat file2 >> newfile
    etc.

    (use loop instead of list: for i in *.mp3; do; done)

    “>>” is the token for “append” file instead of overwriting file.

    And it works! The new combined mp3-file can be played on xmms.

    Never thought it would be so easy!

  2. I tried it on xp and it worked great!
    This has solved my problem big time! I was searching for ActiveX dlls to do the same for quite long for my site.

    BTW, syntax on XP is:
    > copy file1.mp3 + file2.mp3 + file3.mp3 end_result.mp3

    Thanks for the info. ajohnson

  3. Hmmm, I tried Armjamil’s XP syntax but it didn’t work for me. I used it to combine 3 mp3’s totaling 11MB and the output file was only 3KB. Well then, I’m off to search for another solution…

  4. To do it with Audacity just open both files you want to merge. In the first file set the cursor to the end (Edit->Move Cursor->End of Track). In the second file select everything (CTRL-A) and copy it (CTRL-C). Go back to the first file, paste the second file (CTRL-V) and you are ready to go. To do it with 50 files though is a PITA, so your way may be better.

  5. FYI the XP syntax above needs the /b binary switch inserted, as described in the original post, and then it works great, almost instantly.

  6. Thank you, thank you, thank you!!! This was so easy and here I thought I was going to have to buy something…

    Thanks again!

  7. can u belive there are programs out there who need registering – money payed to do this. I just couldn’t belive it would work, but i tried it and it does. If u have more mp3 files just put them into a directory and type:

    copy /b *.* big_mp3_file.mp3

  8. It’s a very nice way to merge files. There is one problem. The headers of mp3-files are also merged.

    What those “have to register and/or pay” programs do is remove the header of the next file(s) and adjust the header of the first file. There is alot of info in the header, like ID3tags, audio length, … that should be removed or adjusted…

  9. Wow! Thanks alot! I was trying to figure out an easy way to do this with audacity as well. I made a one line .bat file with balamaci’s comment. Now all I have to do is run the file in any directory with all my files in it!

    copy /b *.* big_mp3_file.mp3

    I’m using Audacity to resample/save it. Hopefully that will clean up the header issue.

  10. Thanks very much. I was just about to give up when I found your tip. (Thanks too to Armjamil for the XP tip and to AgapeDesciple for reminding me about bat files.)

  11. Thanks very much for the original info – works a treat. If you ensure files are sequentially numbered it will ensure they are appended in the right sequence.
    Note to dave31175 – no doubt he has now solved or given up, but if you copy without the /b modifier, it will not copy MP3 correctly. You must use /b after the copy command
    ie copy /b *.* test.mp3
    Again thanks for the original suggestion!!!

  12. Glad to find this info. I needed to merge a bunch of MP3s to accompany a freeware slideshow app which will play a single MP3 while the slides rotate.

    Couple of things to note:
    – you can easily edit the ID3/ID2 tags using a free player like Winamp
    – I needed to add a break between each track, so I created an MP3 of 2 seconds of silence using Audacity. Put this between each track (and at the start or end if you plan to loop the audio) to create some breathing room.

    Thanks again…

  13. THANK YOU, THANK YOU! How easy. 3 1/2 years and it still does a fine job in Win XP.

    Here is what worked for us (remembering that DOS files need to have file names of 8 characters or less, and we used the lower case “b”):

    copy /b file1.mp3 + file2.mp3 end_file.mp3

    WOO-HOO!

  14. The thing is i want to actually mix the sound files so they are one file but they play together. One file has words but it needs music to it, so i just want to combine the two audion mp3 files and intertwine them.

  15. Trick I use with this is to first use id3remover to clean the MP3 files first. If there are multiple directories (e.g., series of CDs for a book) I use the following command from the directory where the subdirectories contain the MP3 files:

    for /f “delims==” %A in (‘dir /on /ad /b’) do copy /B “%A\*.mp3” “%A.mp3”

    Very neat and fast.

  16. Sorry, this may be a dumb question, but I’ve gone into DOS and can add those files… then it lists my files’ names and says 1 file copied… but where does the end_result.mp3 file end up?

  17. The command line worked incredibly well however what I am trying to find is a way to merge them without the breaks in between the tracks….if anyone has a suggestion it would be helpful

    Thanks

  18. After that copying, the big mp3 file is shredded by multiple headers from input mp3s. To fix the stream and write correct time for it you need use Foobar2000 (simply and great mp3 player). For CBR mp3s Right click on big mp3 file than choose Utils and next “Rebuild MP3 Stream”. For VBR mp3s use Utils -> “Fix MP3 VBR header”. And for mixed input mp3s use both methods 🙂 Enjoy.

  19. If you have multiple files then you would need to use append, right? Otherwise each file would write over the target file. Try this instead:
    $ cat *.mp3 >>big.mp3

    Those of you who are looking to get this done for free could try a Linux test drive CD, they can access a Windows drive and let you do Linux commands like this on them (using an Xterm console).

    > Nice!
    > I do it using cat:
    > $ cat *.mp3 >big.mp3

  20. WINDOWS 7: Followed the above. Couldn’t have been easier. Recap:

    In windows explorer create a new directory inside the c> directory. Let’s call it “test”. Put the files you want to merge into that directory

    Hit Start, type “cmd” in the box to get to dos prompt. If you find you’re in a dos subdirectory, such as c> windows then type two dots (..) and hit return to get you to c>

    Then type cd_test (use a space instead of the underscore)

    now it looks like this:

    c>test>
    Here’s the syntax

    c>copy_B/_*.*_NEWFILENAME.mp3 (make sure you put spaces where I have used underscores) (hit enter)

    You’re done. Dos has created a new file with an mp3 extension. I just combined 120 files in ten directories. All was copasetic. I am pretty sure it puts the files together in alphanumeric order.

    Win7 DOS will probably allow you to create a batch file. At the prompt type

    edit_merge.bat (hit enter)

    You will be shown a screen. Input the above “copy” command and save it. Next time you won’t have to retype the command every time, you just go to test> and type “merge” (and hit “enter”). Of course you can name the bat file anything you want.

    Keep in mind, you will have to remove the merged file from that directory before you use the bat file again, because it will overwrite the one you created previously.

  21. Anyone know if it possible to do something similar but in reserve? I have one bib file and I want to split it into 12 smaller files. I would like to split the files at a given time so that I will have 11 time stamps where each split should be.

    Any ideas?

  22. i use iDealshare VideoGo to merge my MP3 files into one, it also helps me to combine WAV, M4A, WMA, AIFF, FLAC, OGG, and etc.

  23. Have you tried Faasoft Audio Joiner?

    It supports joining any audio formats like merge MP3, merge WAV, merge M4A, merge FLAC, AAC, WMA, M4B, AC3, VOC, CAF, APE, AIFF, Apple Lossless ALAC, QCP, AMR, AWB, DTS, AU, RA, OGG, XWM, 3GA and more.

  24. I highly recommend Avdshare Video Converter to convert MP3 to other audio formats, like converting MP3 to OGG, converting MP3 to WMA, converting MP3 to M4A, to WAV, FLAC, DTS, AIFF, etc.

  25. Hi Everyone, really helpfull its very great and the mp3 are not re encoded or losing quality exactly the same as the orginal, don’t trust the merge site online.
    BUT i have a big problem. My aim is to do 1hr compilation to post it on youtube; i use tunestotube to do that cause its very fast and no need to make a movie for that.
    When i read the 1hr merged file on WMP it works great and on windows the tags of the file is 1hr so no problem.
    When i play the same file on my mac with quicktime it only play sthe first file (the time of the audio in the info is the 3 or 4 minuts firt file). The file is 150mb..
    The Problem is that Youtube also only recognize the audio time of the first file merged so the movie time is just the firt 3-4 mn and thats all… where is my one hour music? i’ve tried to use mp3val so it re framed the whole file BUT i lost quality when the software remake the file so its not a solution:/
    What can i do to only modify the audio lengh information so it could be good? or maybe change the audio time info of the 1st track… disapointed

  26. Thanks. Share an alternative to Audacity – Joyoshare Video Joiner. It can batch merge unlimited MP3 files into one without any quality loss and output the whole MP3 file to any other format at 60X speed.

Leave a Reply to Armjamil Cancel reply

Your email address will not be published. Required fields are marked *