README FOR flatphoto.pl 2010-06-09 NOTES: Ts utility is for Windows XP and later, with photos stored on an NTFS file system. Requires the perl scripting language -- free at www.perl.org Requires junction.exe, from SysInternals/Microsoft -- http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx BACKGROUND: We've got a gazillion digital photos, and they're organized hierarchically by date. E.g., c:\images\2010\06 June\Sara's Birthday c:\images\2009\07 July\Paris\Day 3 - Giverny etc. Apple IPAD only supports one level of directories for its photos. E.g., mine showed "2010" and "2009". Now, I'm not going to reorganize my photos just for Apple, and I don't particularly want to waste disk space by making an IPAD-compatible copy of my photos. What I want is a flat, IPAD-compatible directory structure that refers to the actual photos in their proper location (i.e., takes no more disk space). On LINUX or MAC OSX, symbolic links can help accomplish this quite easily. On WINDOWS XP and later, symbolic links are called "Junctions" and are poorly supported. But if you download the junction.exe utility from microsoft/sysinternals, then this perl script can help create a flat IPAD-compatible directory structure from your photos. USAGE: flatphoto.pl [top-level-string] flatphoto.pl -d This script recursively scans source-directory and, for each subdirectory that contains at least one photo, it creates a "junction" in the target-directory pointing to it. E.g., say you have this structure: c:\images\2010\June c:\images\2010\June\Sara's Birthday c:\images\2010\June\Hollywood trip perl flatphoto.pl c:\images c:\itunes-photo-drop would create: c:\itunes-photo-drop\2010-June c:\itunes-photo-drop\2010-June, Sara's Birthday c:\itunes-photo-drop\2010-June, Hollywood Trip To ITUNES, each of these junctions looks like a folder with the actual pictures, but they don't take any extra space on your hard drive. All you have to do is sync the c:\itunes-photo-drop directory, and all your hierarchically-sorted photos will get somewhat legible folder names. The top-level-string is optional. If provided, it's added to the front of each junction name. WARNINGS: Windows junctions are not well-supported. Do not use Windows Explorer or any other file utility to delete the junctions or you risk destroying the original pictures! (you do have backups, right?) The best way to delete the junctions is to "flatphoto.pl -d " this safely uses the junction.exe utility to remove all files that are junctions. If you do use Windows Explorer to delete the junctions, be sure to use a recycling-bin delete (i.e., not a shift-delete that bypasses the recycling bin). LICENSE: This script is open and free for any and all uses. AUTHOR: Craig Weinhold (cweinhold@gmail.com)