#! /usr/bin/ksh
cd $FINAL_DESTINATION
find $BACKUP_LOCATION -name "*.jpg" | while read line
do
p=$(dirname "$line" )
p1=$(echo $p | sed 's/\///')
echo "$p1"
mkdir -p "$p1"
cd "$p1"
tocopy=$(pwd)
echo $tocopy
cp "$line" "$tocopy"
cd -
done
Source: http://www.unix.com/shell-programming-scripting/65013-find-copy-files-absolute-path.html - I added the extra double quotes (") to make sure it works with paths that contains spaces.
2. Imported all my photos from $FINAL_DESTINATION into iPhoto (under 1 single Library).
3. Currently using: Duplicate Annihilator to eliminate my duplicates -- Yup, I know, I could have written something myself, but then again I have better things to do with my life :-)

1 comments:
<joke>Why don't you just hit the 'it just works' button?</joke> :-P
Post a Comment