runQuickPix.sh

#!/bin/bash
 
 
# clean up
rm /home/$USER/.wine/drive_c/bilder/*.txt
rm -r /home/$USER/.wine/drive_c/bilder/Backup/_*
rm /home/$USER/.wine/drive_c/bilder/LargeJPG/*.jpg
rm /home/$USER/.wine/drive_c/bilder/web/*.jpg
 
 
# create quickpix config
COUNT_IMAGES=$(ls /media/CAMCARD/DCIM/100NIKON/* | wc -l)
COUNT_IMAGES=$((COUNT_IMAGES/2))
 
if [ $COUNT_IMAGES -gt 9 ]; then
        FILENAME=_000${COUNT_IMAGES}.txt
else
        FILENAME=_0000${COUNT_IMAGES}.txt
fi
OUTPUT=/home/$USER/.wine/drive_c/bilder/$FILENAME
 
i=1
while [ $i -le $COUNT_IMAGES ]; do
   echo "$i, 701" >> $OUTPUT
   i=$((i+1))
done
 
unix2dos $OUTPUT
 
 
# start quickpix
cd /home/$USER/.wine/drive_c/QUICKPIX
wine QUICKPIX.EXE