February 20, 201016 yr 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
February 20, 201016 yr 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"
February 20, 201016 yr Author Try this:FOR %%A IN (%*) DO ffmpeg -i "%%~A" -acodec alac "%%~dpnA.m4a"success! Thank you so much.
Create an account or sign in to comment