| 1. |
Solve : need a batch file to convert multiple sound? |
|
Answer» I need some help please. I am just learning to make batch files. I am using win xp sp2. I have a bunch of wav files on a cd that I need to convert to u-law. I am using sox to convert them but at this time, I can only convert one at a time. What I need it to do is convert all of them to seperate files. Not sure if you have a typo, but this may help:Please EXPLAIN where or what the error was. I am not familiar with your SOX program but I can find no error in the batch portion of the file. 8-)I open a text editor and copy cd c:\sox12181 for /f "tokens=1-2 delims=." %%i in ('dir /b *.wav') do ( sox.exe -V d:\%%i.wav -r 8000 -c 1 c:\ulfiles\%%i.ul ) and make it converter.bat when I run it, you see a command line blink real fast but there is not output into the directory If I run c:\sox12181> for /f "tokens=1-2 delims=." %%i in ('dir /b *.wav') do (sox.exe -V d:\%%i.wav -r 8000 -c 1 c:\ulfiles\%%i.ul) at the command line, I get "%%i was unexpected at this time" sox can be found here http://sox.sourceforge.net/ I really do thank you for your suggestions. Quote Please explain where or what the error was. I am not familiar with your SOX program but I can find no error in the batch portion of the file.Yeah, when running a FOR statement at the command line, you only need the single %. The PROBLEM is with the path or lack of it for the DIR command: Code: [Select]cd c:\sox12181 for /f "tokens=1-2 delims=." %%i in ('dir /b d:\*.wav') do ( sox.exe -V d:\%%i.wav -r 8000 -c 1 c:\ulfiles\%%i.ul ) 8-)Thank you very much!!! this worked cd c:\sox12181 for /f "tokens=1-2 delims=." %%i in ('dir /b d:\*.wav') do ( sox.exe -V d:\%%i.wav -r 8000 -c 1 c:\ulfiles\%%i.ul) |
|