0
votes

I'm using Sox with Windows 10

I need to concatenate a large number of files. These are all wave files in identical format. The files need to be joined in pairs and saved.

An example might be the best way to explain. I have file1.wav, file2.wav, file3.wav... I also have firstfile.wav. I need to concatenate these files.

sox firstfile.wav file1.wav newfile.wav

sox firstfile.wav file2.wav newfile2.wav

Is it possible to automate the process of concatenating all of these files, creating a new file for each pair of files by a single line from the windows command line?

Any help would be appreciated!

1

1 Answers

0
votes

The algorithm I can think of is:

  1. Rename file1.wav to tempfile.wav.
  2. Run command sox firstfile.wav tempfile.wav file2.wav
  3. Rename firstfile.wav to tempfile.wav
  4. Repeat step 2 for the next file using the new file instead of file2.wav else rename tempfile.wav to firstfile.wav.