Jman1993 Posted February 20, 2010 Share Posted February 20, 2010 I have created the following batch file to use ffmpeg to convert flac/wav files to /m4a files that can be played on my ipod... I will later use this script as a template to convert files to flac, wav, mp3, etc. Anyways, when I run this script, and i drag 2 files onto the batch file (example 1.flac and 2.flac) they both output a filename of 1.m4a instead of 1.m4a and 2.m4a. Thus, I can only convert one file at a time. Is there anyway to fix this so that the output filename will be the same as the input for seperate files?for %%A in (%*) DO (ffmpeg -i %1 -acodec alac "%~dpn1".m4a)pause Link to comment Share on other sites More sharing options...
Yzöwl Posted February 20, 2010 Share Posted February 20, 2010 Anyways, when I run this script, and i drag 2 files onto the batch file (example 1.flac and 2.flac) they both output a filename of 1.m4a instead of 1.m4a and 2.m4a. Thus, I can only convert one file at a time. Is there anyway to fix this so that the output filename will be the same as the input for seperate files?for %%A in (%*) DO (ffmpeg -i %1 -acodec alac "%~dpn1".m4a)pauseTry this:FOR %%A IN (%*) DO ffmpeg -i "%%~A" -acodec alac "%%~dpnA.m4a" Link to comment Share on other sites More sharing options...
Jman1993 Posted February 20, 2010 Author Share Posted February 20, 2010 Try this:FOR %%A IN (%*) DO ffmpeg -i "%%~A" -acodec alac "%%~dpnA.m4a"success! Thank you so much. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now