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

18 lines
386 B
Bash
Executable file

#!/usr/bin/env bash
trap 'echo; echo "Exit"; exit 0' SIGINT
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" \;