Skip to content

Commit

Permalink
Add rename script
Browse files Browse the repository at this point in the history
  • Loading branch information
jrzvnn committed Jul 12, 2023
1 parent a069550 commit 759a598
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions rename_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

count=1
prefix="manila_cathedral_"
folder="/home/jrzvnn/Documents/Projects/tour-in-tramuros/data/train/manila_cathedral/"

cd "$folder" || exit

for file in *; do
if [ "$count" -le 25 ]; then
extension="${file##*.}"
new_name="${prefix}${count}.png"
mv "$file" "$new_name"
((count++))
else
break
fi
done

0 comments on commit 759a598

Please sign in to comment.