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


Click here to return to the 'dont duplicate, link them' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
dont duplicate, link them
Authored by: SOX on Feb 28, '05 06:10:08PM

Instead of duplicating the files just link them using the unix command "ln". this will not physically duplicate the files. But you can treat the linked copies as though they were copies.



[ Reply to This | # ]
Link-instead-of-duplicate code change
Authored by: genericuser on Mar 02, '05 11:31:39PM
Yes, you are absolutely right, creating symbolic links will potentially save a lot of disk space (it's a function of how many images you use as rotating desktop photos). I was so focused on simply replicating the iPhoto Export functionality that I didn't even think to do something smarter and use symlinks.

At first I tried making regular, good ol' aliases with the script since that is the Mac way of doing things. I thought the Desktop System Preference would thus be happier with aliases than with symlinks, but oh boy was I wrong! Aliases didn't work at all. So, change this line:
do shell script "cp " & quoted form of image_path & " " & quoted form of target_dir_path
to this:
do shell script "ln -s " & quoted form of image_path & " " & quoted form of target_dir_path
in order to have a folder full of symlinks instead of copies of all the image files.

-Geoff

---
Bugmenot public account

[ Reply to This | # ]