Advertisement
Guest User

ConvertToOgg.bat

a guest
Mar 16th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.66 KB | None | 0 0
  1. @echo off
  2.  
  3. REM Set the local directory to find the python script
  4. REM SETLOCAL
  5. SET v=%CD%
  6. echo the pth is %v%
  7. echo
  8.  
  9.  
  10. call :treeProcess
  11. goto :eof
  12. REM
  13. REM recursively convert wave files to ogg
  14. REM Also create a file <wavnam_Dur>.txt file containing the
  15. REM string "Length s <duration of sound in seconds>
  16. REM
  17.  
  18.  
  19.  
  20. :treeProcess
  21. rem Do whatever you want here over the files of this subdir, for example:
  22. for %%f in (*.wav) do (
  23.  cd
  24.  echo %%f
  25.  sox --norm=-1  %%f --compression 7 %%~nf.ogg
  26. REM  sox %%f -n stats 2>&1 | find "Length" | python "%v%\len.py" > %%~nf_Dur.txt
  27.  
  28.  
  29. )
  30. for /D %%d in (*) do (
  31.     cd %%d
  32.     call :treeProcess
  33.     cd ..
  34. )
  35. exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement