I am using following commands to delete or remove the images to trash. It is only used to delete images and not the video. I don't get nay error with it.
Code:
#!/bin/sh
echo "Trashing originals";
test -d ~/.Trash/iPhoto-Originals || mkdir ~/.Trash/iPhoto-Originals
cd ~/"Pictures/iPhoto Library/Modified/"
find . -type f -iname *.jp*g -exec sh -c '
test -f "../Originals/{}" &&
dir=`dirname "{}"` &&
(
test -d ~/.Trash/iPhoto-Originals/"$dir" ||
echo mkdir -p ~/.Trash/iPhoto-Originals/"$dir" &&
mkdir -p ~/.Trash/iPhoto-Originals/"$dir"
) &&
echo mv "../Originals/{}" ~/.Trash/iPhoto-Originals/"$dir" &&
mv "../Originals/{}" ~/.Trash/iPhoto-Originals/"$dir"
' \;
I hope this will help you.
Bookmarks