This repository has been archived on 2024-04-27. You can view files and clone it, but cannot push or open issues or pull requests.
autoytdlp/convert.sh

20 lines
405 B
Bash
Raw Normal View History

#!/usr/bin/env bash
trap 'echo; echo "Exit"; exit 0' SIGINT
2023-01-27 10:51:02 +03:00
mkdir -p ./convert
echo "Enter input files extension:"
echo "(empty string to match all)"
read -r ext_input
if [[ $ext_input == "" ]]; then
ext_input="*"
fi
echo "Enter output files extension:"
echo "(must not be empty)"
read -r ext_output
find ./files -type f -name "*.$ext_input" -exec \
bash ./.convert_helper.sh {} "$ext_output" \;