sox trim with batch
Posted: 26 Nov 2016 05:00
Dear Members,
I wish to trim first 15 seconds from multiple audio files, kept in folder 'multiplefiles' .
for test purposes, i have taken up 3 audio files, x.wav, y.wav, and z.wav
below is the code
@echo off
cd E:\trim\multiplefiles
mkdir trimmed
FOR /F %%A IN ("*.wav") DO sox "%%A" "trimmed\%%~nxA" trim 15
The above code, however, merges the 3 files into folder 'trimmed' , names it as 'x.wav' and only trims 14 seconds from the sum of the merged audio. i do not want this. I want individual files trimmed 15 seconds and sent to 'trimmed' folder.
Please suggest where I am going wrong.
I wish to trim first 15 seconds from multiple audio files, kept in folder 'multiplefiles' .
for test purposes, i have taken up 3 audio files, x.wav, y.wav, and z.wav
below is the code
@echo off
cd E:\trim\multiplefiles
mkdir trimmed
FOR /F %%A IN ("*.wav") DO sox "%%A" "trimmed\%%~nxA" trim 15
The above code, however, merges the 3 files into folder 'trimmed' , names it as 'x.wav' and only trims 14 seconds from the sum of the merged audio. i do not want this. I want individual files trimmed 15 seconds and sent to 'trimmed' folder.
Please suggest where I am going wrong.