Bulk Remove Left Channel WAV files

retain channel 2 from Audio files

The SOX command to remove channel 1 and retain channel 2 is the remix option:

sox <original-audio-file> <new-audio-file> remix 2

This example would trim from 0 seconds to 60 seconds.

@echo off
path=%path%;C:\Program Files (x86)\sox-14-4-2
cls

set confirm=N
echo ***************************
echo Audio ALAW Converting tool
echo ***************************
echo The sox.exe must be located in the current folder or on the OS PATH.
echo Download sox from http://sox.sourceforge.net/
echo ******************************************************************
echo. 
set /P confirm=Do you want to proceed and overwrite and remove the LEFT Channel (channel 1) from the wav files?

IF "%confirm%" == "Y" goto convert
IF "%confirm%" == "y" goto convert
goto noconvert


:convert
echo Trim files now.
echo please wait.....
echo.
FOR /R . %%i IN ("*.wav") DO (
sox "%%i" "%%~pni-temp.wav" remix 2
move "%%~pni-temp.wav" "%%~pni.wav"
)

pause
exit

:noconvert
echo No converation took place
pause
exit
  • tech-notes/scripts/bulk-audio-channel2.txt
  • Last modified: 2023/10/13 09:53
  • by gerardorourke