How to easily merge multiple mp3 files into a single mp3 file using CMD


In this post, I am going to show you how you can easily merge mp3 files using windows command prompt (CMD), a free program that comes with your Windows installation.

Now before we jump into the step-by-step guide, you’ll need to know 2 CMD commands to successful merge mp3 files into one: CD and COPY. 

CD is short for Change Directory. This is the command you’ll use to navigate through directories, known as folders in Windows, in a drive.

The COPY command copies one or more files into another location, drive or folder.

With that out of the way, let’s me show you how to merge multiple mp3 files into a single mp3 file using CMD. And we have a dedicated post on how to split audio files using audacity.

Step 1: Launch Command Prompt (CMD)

Step 1: Launch Command Prompt (CMD)

Click on windows search or Cortana and search for Command Prompt or CMD. Command Prompt will show up in the search results. Click on it to launch or press enter. You can also launch CMD from the Run command: simultaneously press the windows + r keys and then type CMD and click okay or press enter.

Step 2: Copy the Folder Path

Step 2: Copy the Folder Path

Open windows explorer and navigate to the folder that contains the files. Click on the address bar to reveal the folder path. Note the drive letter, in this case it’s G, and then copy the folder path.

Step 3: In CMD Navigate to the Drive

Step 3: In CMD Navigate to the Drive

Head back to command prompt and type the drive letter and a colon. The drive that contains the folder that contains my files is drive G. So I type G colon.

Then hit enter. This is how you navigate to drives in CMD. Type in the drive letter, colon, and hit enter.

Step 4: In CMD Navigate to the Folder

Step 4: In CMD Navigate to the Folder

Now that we are in the right drive, let’s navigate to the folder that contains the files. We’ll use the change directory command.

So type CD, space, then right click with your mouse. Right clicking with your mouse pastes the folder path that we copied from the address bar in Step 2. Press enter. And you have successfully navigate to the folder that contains your files.

Step 5: Merge your mp3 files into one

Step 5: Merge your mp3 files

You are now one step away from combining your mp3 files into one file. We are going to use the COPY command, to merge two mp3 files into a one mp3 file.

Let’s write this out:

copy /b first-mp3-file.mp3 + second-mp3-file.mp3 merge.mp3

You do need to make sure that you replace the placeholder names with the names of your mp3 files, and don’t forget the extension (.mp3). You will also need to name your destination file, in the code above mine is merge.mp3. But you can name it whatever you want.

Then press enter. CMD with process the combination of the mp3 files.

Once CMD is done merging the mp3 files, you’ll get an output of the merged files

A few nota bene:

If your filenames have spaces you’ll need to surround them with quotes, so “my file1.mp3” + “my file2.mp3” and then the destination filename. If you don’t, you’ll get a syntax error.

You can also use wildcards to define your source files. Let’s say you have a folder with numerous mp3 files that you want to merger into one mp3 file. Instead of writing all the filenames, you can simply type:

copy /b *.mp3 merge2.mp3

Then hit enter. And all the mp3 files in the folder will be combined into merge2.mp3 file.

You can also define the folder path of your destination file. Simply append the folder path to the destination filename. So G:\merge.mp3 will save the merged mp3 file in the G drive root folder.

Finally, this method also works for other binary files, audio, mp4 video, and so forth. And text files, for instance, notepad (.txt), and excel files (.csv). Simply change the parameter to stroke A or remove it as the DOS default parameter is text files.

And for those of you that like video guide, here is one:

That’s it for this post. Check out this post on how you can copy file names into excel using CMD, and if you have any questions, comments, suggestions, please post them in the comment section below. Have a great day!

, ,

19 responses to “How to easily merge multiple mp3 files into a single mp3 file using CMD”

  1. Softcoated Avatar
    Softcoated

    Nicely Done. Cuts through all the crap everyone else is selling.

    1. Kongo Avatar
  2. Iliya Avatar
    Iliya

    Hello! Nice way to merge audio files but when I have such numbered files like 01.mp3, 02.mp3 etc. and I want to merge with the file record55.mp3 as 01.mp3 to be in the beginning of the merged file and 02.mp3 to be at the end of the merged file it does not work! The first file is record55.mp3 then 01.mp3 and 02.mp3!
    So the question is: How to order them in desired order? Is there any way?
    Kind regards and have a nice day!

    1. Kongo Avatar

      If you specify the order, copy /b 01.mp3 + record55.mp3 + 02.mp3 merge.mp3 (merge.mp3 is the name of the new file), it should work. If you are using wildcard, copy /b *.mp3 merge.mp3, the files will be merged using unsorted order. You can find this order by using the dir command. If you want to use the wild card, then individually copy the files to a new folder using the order you want them merged and the merge should work. How Windows lists unsorted files is a complex process…so I can’t guarantee that this will work.

      1. Zach Avatar
        Zach

        The unsorted files are made the way they are added in the directory Newer files are put into the bottom of the file directory

        Now if a file is deleted from this directory If you add a new file , it can be registered in the deleted files position

        I know that after experimenting a lot a few years ago. This also happens with your MP3 listing

        1. Kongo Avatar

          Thanks Zach for confirming this. I always thought this was the case, but never did the experimentation to back it up.

    2. matt Avatar
      matt

      command prompt merge them by name in alphabetical numerical order. like a-z, 0-9 . if you have files with numbers more than 0-9 like 1-30. It will merge your files like 1,10,11,12,13,14,15,16,17,18,19,2,21,22,23,24,25,26,27,28,29,3,30 in order. So you better off using another name segment like rename your files according to alphabetical numerical order( like a-z, 0-9)

      1. zach Avatar
        zach

        better idea . Just use a short name select a few files then press return
        All the remain files willbe automatically renamed
        Anold tip foynd instantly

  3. matt Avatar
    matt

    Thanks for info.

  4. Zach Avatar
    Zach

    I just tested with various files if they are joined:
    MP3 are OK Also AAC

    WMA are NOT joined !
    JPG Neither!
    DOC neither! only the first file is shown

    Notice that also for mp3 files:
    If files have different bit rates they are played well
    If the first file is mono only and the second is stereo , the result will be mono only
    If the fist file is 44 kHZ ad the second is 48000 only the first file will be heard. The remain flies will seem as VACANT!

    Part of my life was handling mp3 files music and audio engineering

  5. Rich Avatar
    Rich

    I just tried this, but the resulting mp3 files seem to be tiny with no contents.. Any idea what I’m doing incorrectly?

    1. Kongo Avatar

      Most likely the merge does not happen and that’s why you end up with tiny files.
      There could be a few reasons for this – I can help troubleshoot. Could you please share the properties (bitrate, sample rate, encoder) of the mp3 files you are trying to merge?

  6. Jerry Avatar

    Hello Kongo,
    thanks for providing excellent instructions.
    I completed the copy process creating a new .mp3 file in the same drive. The Command results looked like this:
    D:\Audacity\KAHM radio> copy “track 1.mp3” + “track 2.mp3” merge.mp3
    track 1.mp3
    track 2.mp3
    1 file(s) copied.
    D:\Audacity\KAHM radio>

    track 1.mp3 is 865 MB and track 2.mp3 is 109 MB
    BUT, the merged file, merge3.mp3 was only 245 KB, and unplayable.

    Are my files too long to merge? Both mp3 files were recorded using variable mp3 rate.

    Any thoughts?

    Thanks again.

    1. Kongo Avatar

      Hello Jerry. You are missing the /b switch which tells CMD that you want to copy binary files. If you don’t include this switch, CMD defaults to /a, which are text files.
      So, D:\Audacity\KAHM radio> copy /b “track 1.mp3” + “track 2.mp3” merge.mp3 should work!

      1. Jerry Avatar
        Jerry

        That worked! Thanks for the great advice. Maybe you could include the “/a” and “/b” switch in your instructions.

  7. Izzy Avatar

    COOL!!
    also can combine mp4,mpg.. i tried and it works

  8. Gabriel Avatar
    Gabriel

    Hello Kongo,
    I’ve been trying to merge a number of audio book files in m4a format without success. Your method worked, partly. The files were joined ok, the size of the file was correct but the length of the file was only the same as chapter 1. Is there a way to fix this.
    Thank you
    Gabriel

    1. Kongo Avatar

      Not sure you can fix it in CMD.
      I’d suggest you look into ffmpeg.
      It would accomplish this easily with a single line of code.
      And it’s open source.

  9. humble dude Avatar
    humble dude

    Thank you for your detailed instructions. It helped a lot. No need for any external programs.
    Cheers bud!

Leave a Reply

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