/ Published in: Windows PowerShell
Expand |
Embed | Plain Text
@ECHO OFF REM usage: put files to targetdir (default is named "put_files_here") folder and change the convert formats in the for loop to match what you want to do if you need a different format. Then you simply run this script and it will convert them all. REM Based on: http://stackoverflow.com/questions/180741/how-to-do-something-to-each-file-in-a-directory-with-a-batch-script REM Update: if the directory contains files with space in the names, you need to change the delimiter the for /f command is using. for example, you can use the pipe char. REM %~dp0 is the directory of this bat file SET targetdir=put_files_here FOR /f "delims=|" %%f IN ('dir /b "%~dp0/%targetdir%"') DO ( echo Converting: %%f %~dp1ffmpeg.exe -i "%targetdir%/%%f" -vn -ar 48000 -ab 192000 -ac 2 "%targetdir%/%%f.mp3" ) echo Finished PAUSE
You need to login to post a comment.
