SoX バッチファイルの記述(Windows)
rem Example of how to do batch processing with SoX on MS-Windows.
rem
rem Place this file in the same folder as sox.exe (& rename it as appropriate).
rem You can then drag and drop a selection of files onto the batch file (or
rem onto a `short-cut' to it).
rem
rem In this example, the converted files end up in a folder called `converted',
rem but this, of course, can be changed, as can the parameters to the sox
rem command.
cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox %%A "converted/%%~nxA" rate -v 44100
pause
rem 上記の内容をテキストファイルにコピーし、拡張子を.batにして保存。
rem 動作:ドラッグ&ドロップしたファイルを、convertedというフォルダの下に、サンプルレート44100Hzで変換。
rem コマンドラインがストップしたらどれかキーを押して抜ける。
rem sox.exeと同じ場所において、バッチファイルのショートカットを作っておくか、
rem 先にWindowsのシステムのプロパティ→環境変数→pathでsoxの場所(スペースやピリオド、日本語などの入っていないところ)を書いておくと、sox.exeと同じ場所にしなくても動作する。