|
|
10.7: Auto-copy Photo Stream images to a folder
Just for the instructive value, this is also pretty easy to do on the command line with 'find' (for looking for files) and 'xargs' (for executing the copy). Now, if what you're after is to copy the files, then you want something like find srcdir -iname *img* -print0 | xargs -0 -J % cp % destdir
But it might be more elegant (no idea how it works with iCloud) to use symlinks instead: find srcdir -iname *img* -print0 | xargs -0 -J % ln -s % destdir
Basically, what this does is to use 'find' to locate files whose name matches the regular expression *img* (case insensitive, since I used -iname instead of -name), and then sends them to xargs, which takes them in batches and executes cp or ln -s with them. the "-print0"/"-0" pair is important when filenames have spaces in them, which they often do. For bonus points, this should even work with mdfind, in case you want to take advantage of a your spotlight index to do even more advanced searches.
10.7: Auto-copy Photo Stream images to a folder
Interesting, and a very nice tip. Kudos to DJF3.
I guess if your $HOME variable points to the right place you can do without srcdir and use: find $HOME/Library/Application\ Support/iLifeAssetManagement/assets -iname *img* -print0 Now you can xargs to copy into ~/Pictures which should be empty, right (C: |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|