scripts/hugin-gopro-fusion/remove_pto_batch.sh

29 lines
852 B
Bash
Raw Permalink Normal View History

2024-02-12 10:29:58 +01:00
#!/bin/bash
# déplacer en masse des photos assemblées dans le dossier /home/poule/encrypted/stockage-syncable/photos/imageries/gopro/A_ORIENTER
# Argument validation
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <start_number> <end_number>"
exit 1
fi
start_num="$1"
end_num="$2"
2024-02-12 10:41:44 +01:00
src_base_name="merging_"
2024-02-24 00:17:50 +01:00
count=0
2024-02-12 10:29:58 +01:00
2024-02-24 00:17:50 +01:00
echo "supprimer des fichiers PTO "
# supprimer des fichiers PTO
2024-02-12 10:29:58 +01:00
for i in $(seq -f "%03g" ${start_num} ${end_num}); do
2024-02-12 10:41:44 +01:00
src_file="${src_base_name}${i}.pto"
2024-02-12 10:29:58 +01:00
2024-02-12 10:41:44 +01:00
if [ -f "/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/INBOX_PTO_hugin/${src_file}" ]; then
rm -rf "/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/INBOX_PTO_hugin/${src_file}"
count=$((count+1))
2024-02-24 00:17:50 +01:00
# else
# echo "Fichier '${src_file}' introuvable."
2024-02-12 10:29:58 +01:00
fi
done
2024-02-12 10:41:44 +01:00
echo "Nombre de fichiers PTO supprimés : ${count}"