2 echo "This script is designed to rename a whole season of videos in one go!"
4 echo "What extension do the videos have?(ignoring the dot)"
6 echo "What season are the videos?"
9 echo "You are about to rename the files to:"
11 if [ "$ans" -lt 10 ]; then season
="0""$ans"; else season
="$ans"; fi
13 # list the videos and what they will be renamed to
15 for i
in *.
"$extension"; do
17 if [ "$epiNum" -lt 10 ]; then
18 echo "$i" " --> " "S$season""E0$epiNum"" - .$extension"
20 echo "$i" " --> " "S$season""E$epiNum"" - .$extension"
24 # Asks for confirmation for renaming
27 echo "Are you sure?(y/n)"
30 if [ $ans2 = 'y' ]; then
32 for i
in *.
"$extension"; do
34 if [ "$epiNum" -lt 10 ]; then
35 mv "$i" "S$season""E0$epiNum"" - .$extension"
37 mv "$i" "S$season""E$epiNum"" - .$extension"
41 elif [ $ans2 != 'n' ]; then
42 echo "Please enter either y or n !"