Last active
November 6, 2019 09:33
-
-
Save jshbrntt/9314769 to your computer and use it in GitHub Desktop.
Batch file to convert folder of .flac files to .mp3 using ffmpeg.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
FOR %%f IN (*.flac) DO ( | |
echo Converting: %%f | |
ffmpeg -i "%%f" -ab 320k -map_metadata 0 "%%~nf.mp3" | |
) | |
echo Finished | |
PAUSE |
For everyone else. You just put path in front of the file output. /path/to/%%~nf.mp3
Just info for future readers:
%~f - expands %f removfng any surroundfng quotes (")
%~ff - expands %f to a fully qualified path name
%~df - expands %f to a drive letter only
%~pf - expands %f to a path only
%~nf - expands %f to a file name only
%~xf - expands %f to a file extensfon only
%~sf - expanded path contains short names only
%~af - expands %f to file attributes of file
%~tf - expands %f to date/time of file
%~zf - expands %f to size of file
%~$PATH:f - searches the directories listed fn the PATH
environment varfable and expands %f to the
fully qualfffed name of the first one found.
ff the envfronment varfable name is not
deffned or the file fs not found by the
search, then this modfffer expands to the
empty string
PS:
To use the FOR command in a batch program, specify %%variable instead
of %variable. Variable names are case sensitive, so %f is different
from %F
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can i set different directory as ouput?