Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Export iPhoto events into appropriate directory structure' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Export iPhoto events into appropriate directory structure
Authored by: csholmq on Jul 14, '09 07:16:01AM

I had an issue with events containing a dash (-). Alot of photos were turned into a single file. I tweaked the code a bit and replaced the two parse code rows with;

dir=`echo $filename | sed 's/ - .*//' | sed 's/^[ ]//' | sed 's/[ ]$//' | sed 's/[^A-Za-z0-9 _-]//g'`
file=`echo $filename | sed 's/.* - //' | sed 's/^[ ]//' | sed 's/[ ]$//'`

This way dash is supported and it's easier to tweak the script to use another delimiter than ' - '.

[ Reply to This | # ]