Pergunta

I am trying to make a batch file for SoX, and I have the standard command line code working...

sox.exe -V test-input-file.wav -e u-law -r 8000 -c 1 test-output-file.wav

Here is the batch file I have created...

cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox %%A "converted/%%~nxA" -e u-law -r 8000 -c 1
pause

Any ideas where I am going wrong?

Thanks!

Foi útil?

Solução

Assuming your initial batch command worked, see if this changes anything:

@echo off
cd /d "%~dp0"
mkdir converted 2>nul
FOR %%A IN (*.wav) DO sox.exe -V "%%A" -e u-law -r 8000 -c 1 "converted\%%~nxA"
pause
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top