scripts/hugin-gopro-fusion/remove_pto_batch.sh

29 lines
852 B
Bash
Executable File

#!/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"
src_base_name="merging_"
count=0
echo "supprimer des fichiers PTO "
# supprimer des fichiers PTO
for i in $(seq -f "%03g" ${start_num} ${end_num}); do
src_file="${src_base_name}${i}.pto"
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))
# else
# echo "Fichier '${src_file}' introuvable."
fi
done
echo "Nombre de fichiers PTO supprimés : ${count}"