A script to add icon previews and retain time stamps

Sep 25, '07 07:30:00AM

Contributed by: lullabud

sips is a fantastic command line tool which can add icons to image files so that they don't have to be auto-generated when you open a folder that has Show Icon Preview enabled. However, I never used it on my important images because it updates the files' time stamps as well. This means that if I generate icons today for images I took last year, those files would show up in the Finder as having been created today.

I finally couldn't take it any more, so I wrote a bash script to generate icons while preserving file times. It works on a variety of test files that I've used, including filenames with spaces, but since I'm no bash guru, it could contain some pitfalls.

[robg adds: This worked for me in testing on a few different image files; the icons were created without changing the files' time stamps.]

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070916151152742