2024-02-10 12:38:38 +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"
|
|
|
|
src_base_name="assemblage_"
|
|
|
|
new_folder="from_$start_num"
|
|
|
|
|
|
|
|
# Créer un nouveau dossier dans dst_dir
|
|
|
|
dst_dir="/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/A_ORIENTER/${new_folder}_to_$(printf '%03d\n' "$end_num")"
|
|
|
|
mkdir -p "${dst_dir}"
|
|
|
|
|
|
|
|
# Déplacer des fichiers depuis le répertoire actuel vers le nouveau dossier
|
|
|
|
for i in $(seq -f "%03g" ${start_num} ${end_num}); do
|
|
|
|
src_file="${src_base_name}${i}.jpg"
|
|
|
|
dst_file="${dst_dir}/${src_file}"
|
|
|
|
|
|
|
|
if [ -f "/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/hugin_assemblages_script_output/${src_file}" ]; then
|
|
|
|
mv -- "/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/hugin_assemblages_script_output/${src_file}" "${dst_file}"
|
|
|
|
echo "Déplacé ${src_file} -> ${dst_file}"
|
2024-02-24 00:17:50 +01:00
|
|
|
# else
|
|
|
|
# echo "Fichier '${src_file}' introuvable."
|
2024-02-10 12:38:38 +01:00
|
|
|
fi
|
|
|
|
done
|
2024-02-12 10:41:44 +01:00
|
|
|
|
2024-02-24 00:17:50 +01:00
|
|
|
echo "dossier de destination:
|
|
|
|
$dst_dir"
|
2024-02-12 10:41:44 +01:00
|
|
|
# supprimer les fichiers pto
|
2024-02-24 10:27:55 +01:00
|
|
|
# bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/remove_pto_batch.sh $start_num $end_num
|