Aller au contenu

Script Sdcopy

Featured Replies

Posté(e)

Bonjour à tous

J'utilsai auparavent un scrip permettant de ne copier que les photos contenu sur ma carte SD et qui ensuite les classer par date.

Depuis le passage à DSM 4.2, le script ne fonctionne plus. Le contenu de la carte SD est bien copié, mais l'appel à la fonction exiftool ne semble pas fonctionné.

Quelqu'un à une idée ?

Contenu du script :

#!/bin/ash

# Piggyback for synousbcopy.

# By Jan Eivind Stillingen <janeivind@gmail.com> in October 2011

# Adapted to Synology 211+ for backup via SD-slot and filter on file type.

LOG=/volume1/backup/synousbcopy.log

# Pointer to configured destination for usb/sd copy

DIR_INPUT=/volume1/sdcopy

# Output dir for photos

DIR_OUTPUT_JPG=/volume1/photo

# Output dir for video

DIR_OUTPUT_MTS=/volume1/video/Perso

# Noise and light functions -- See http://oinkzwurgl.org/?action=browse;oldid=ds106series;id=diskstation_ds106series

beep() {

echo 2 > /dev/ttyS1;

}

longbeep() {

echo 3 > /dev/ttyS1;

}

lighton() {

echo @ > /dev/ttyS1;

}

lightoff() {

echo B > /dev/ttyS1;

}

lightblink() {

echo A > /dev/ttyS1;

}

#Call renamed binary

/usr/syno/bin/synousbcopy_bin > $LOG

lightblink

#Extract JPG's to photo directory

exiftool -P -r "-Directory<DateTimeOriginal" -d "$DIR_OUTPUT_JPG/%Y/%Y-%m" "$DIR_INPUT" -ext JPG >> $LOG

#Extract MTS's to video directory

exiftool -P -r "-Directory<DateTimeOriginal" -d "$DIR_OUTPUT_MTS/%Y/%Y-%m" "$DIR_INPUT" -ext MP4 >> $LOG

# Delete $DIR_INPUT

rm -R $DIR_INPUT/*

longbeep

lightoff

Rejoindre la conversation

Vous pouvez publier maintenant et vous inscrire plus tard. Si vous avez un compte, connectez-vous maintenant pour publier avec votre compte.

Invité
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Répondre à ce sujet…

Qui est en ligne (Afficher la liste complète)

  • Il n’y a aucun utilisateur enregistré actuellement en ligne

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.