You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
356 B
Bash
19 lines
356 B
Bash
#!/bin/dash
|
|
echo Convert from...
|
|
read ext
|
|
echo Convert to...
|
|
read toext
|
|
for i in *.$ext;
|
|
do name=`echo "$i" | grep -E '(.+?)(\.[^.]*$|$)'`
|
|
echo "$name"
|
|
ffmpeg -i "$i" "${name}.$toext"
|
|
done
|
|
while true; do
|
|
read -p "Delete original files? " yn
|
|
case $yn in
|
|
[Yy]* ) rm *.$ext; exit;;
|
|
[Nn]* ) exit;;
|
|
* ) printf "Please answer yes or no. ";;
|
|
esac
|
|
done
|