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


Click here to return to the '10.7: Auto-copy Photo Stream images to a folder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.7: Auto-copy Photo Stream images to a folder
Authored by: brianpratt on Feb 10, '12 07:32:34AM
Rather than running a script every 20 seconds, I set up a Folder Action on ~/Library/Application Support/iLifeAssetManagement/assets/sub from within Automator. The only thing in the workflow is a "Run Shell Script" Action with the following contents:
sleep 30 mkdir -p $HOME/Pictures/Photostream find $HOME/Library/Application\ Support/iLifeAssetManagement/assets/sub -iname *img* -print0 | xargs -0 -J % cp -n % $HOME/Pictures/Photostream
The "sleep" is to give time for the images to finish copying in (I couldn't get the "Wait for Files to Copy" action to work how I wanted). I chose to copy files (without overwriting old ones) but you could use symlinks as well with "ln -s" instead of "cp -n". I found that viewing the ~/Pictures/Photostream/ folder with symlinks in it is less than satisfying since the preview icons are generic link images instead of my images.

[ Reply to This | # ]
10.7: Auto-copy Photo Stream images to a folder
Authored by: DJF3 on Jan 29, '13 03:17:45AM

The only issue I have with this is that the copied files get the copy-date.. Would like the copied files to keep the <b>original file date</b>

Any idea how that could be done?



[ Reply to This | # ]
10.7: Auto-copy Photo Stream images to a folder
Authored by: DJF3 on Jan 31, '13 10:13:20AM

I might have found it..

Add '-p' to the cp command. -p will preserve a lot of things (see 'man cp')

Will test it in the next few days
DJ



[ Reply to This | # ]