I have a command line statement which works perfectly when manually typing it into the console, however, when I put it in a bat file it doesn't work.
for %f in (*.flac) do ffmpeg -i "%f" -acodec alac "%~nf.m4a"
Here is the error message when I try running the bat file
The following usage of the path operator in batch-parameter
substitution is invalid: %~nf.m4a"
Is there any way to fix this? The statement converts flac files to alac files using the program ffmpeg.
When batch files are interpreted %% is replaced with %, so your solution would be to replace %f with %%f
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With