How do you convert an entire directory/folder with ffmpeg via command line or with a batch script?
Previous answer will only create 1 output file called out.mov. To make a separate output file for each old movie, try this.
for i in *.avi;
do name=`echo "$i" | cut -d'.' -f1`
echo "$name"
ffmpeg -i "$i" "${name}.mov"
done
i was unexpected at this time.
— May 17, 2014 at 01:09 do name=`echo "${i%.*}"`;
will work on file names with dots (and spaces) in them. — Jun 30, 2015 at 14:50 .bat
in windows? — Jun 30, 2018 at 06:12 sh
syntax. You can install Bash on Windows if you aren't yet prepared to ditch Windows entirely. — Jun 25, 2019 at 16:07