Reverting an alias based Library to an iPhoto organized one.

Hi,
When I installed iPhoto 6, I opted to keep my photo directory separate (Read: unchecked "Copy Files to iPhoto Library folder" option). I soon realized that I couldn't manage the files from within iPhoto anymore (e.g. can't completely remove pictures).
Now I want to revert my library and start letting iPhoto organize the files. I wasn't able to see such an option in iPhoto (the preference I mentioned above only applies to new files, not existing ones). I have around 10,000 pictures with several layers of hierarchy, so a manual solution isn't an option. I don't want to lose other information in my library (ratings, albums and other metadata) so I can't start a new library either.
I know that modifying files from Finder is a "no-no", but I cannot see any other options. So, I wanted to write a script that will go through the iPhoto Library/Originals folder and replace each alias with the original file (after a full back-up of course).
I tried this with a single file, but wasn't able to move the file (see below script). If this works, I can do the same for all files under the Originals folder.
try
set this_file to choose file
set this_folder to the folder of this_item
tell application "Finder"
set orig_item to the original item of this_item
move orig_item to this_folder with replacing
end tell
end try
Unfortunately, this did not replace the file as I intended.
Any ideas/suggestions?

Hi eatalay,
Here's an example of a recursive subroutine that replaces all alias files, in a passed folder path, with their originals.
set f to choose folder
ProcessAlias(f as string)
-- replacess all alias files in the passed folder path (string)
on ProcessAlias(this_folder)
-- get list of folders in this_folder
set utid to AppleScript's text item delimiters -- store old delimiters
set AppleScript's text item delimiters to {return}
tell application "Finder"
set folder_listing to every folder of folder this_folder as string
end tell
set AppleScript's text item delimiters to utid -- restore old delimiters
if folder_listing is "" then
set folder_list to {}
else
set folder_list to paragraphs of folder_listing
end if
-- process folder_list
repeat with sub_folder in folder_list
ProcessAlias(sub_folder) -- send each folder back to this subroutine
end repeat
-- get list of alias files and process them
tell application "Finder"
set alias_files to every file of folder this_folder whose kind is "Alias"
repeat with this_alias in alias_files
try -- error if broken alias
set orig_item to original item of this_alias
set item_dest to container of this_alias
move orig_item to item_dest with replacing
end try
end repeat
end tell
return -- you can return a listing of moved originals if you want
end ProcessAlias
I didn't test for broken aliai yet, but it looks ok. I just thought of something. You might want to keep a list of broken alias files and return it from the subroutine. You can then delete the broken alias or fix them.
gl,

Similar Messages

  • I have a new mac book air and somehow iPhoto was installed twice.  Also, a second library was created and it became the default library.  I attempted to switch to the original library but it won't open.  what can I do to revert to the old library?

    I have a new mac book air and somehow iPhoto was installed twice.  Also, a second library was created and it became the default library.  I attempted to switch to the original library but it won't open.  what can I do to revert to the old library?

    Both iPhotos open to a default library (#2) which has 300+ photos,  I attempted to "switch to library" under the file tab in iPhoto and tried to choose "other library" which had most of my photos.  When I attempt to open it, it doesn't do anything.  I can see it and there are 2 libraries but it won't open.
    Have you tried to open your old iPhoto library by double-clicking it directly, instead of using the File menu?  That should work, if you are running iPhoto '11 and the library has been created by that version or an older version.  DO you get an error message, if you select the library directly in the Finder?
    I checked and it is the latest version of iPhoto.
    Is it iPhoto '11, version 6.0.5? "Latest version" is ambiguous, because it will depend on your system version.
    Where is your iPhoto Library stored?

  • My iPhoto library just reverted to an old library: How can I find, and re-access my current library?

    My iPhoto library just reverted to an old library: how can I find and re-access my current library?  I opened my iPhoto, and got the message that it needed to "update" to use this library.  I thought maybe there had been a software update since I last opened the program (2 days ago).  The library it opened was saved in a file on the desk-top.  My current file was just in iPhoto.  Please help!

    Best option: Restore from your back up.
    Otherwise:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • HT4736 Taking too long (2 minutes) to locate and download photos into Photo '11 9.5 (902.7 build running on an older Intel based MacBook Pro with iPhoto libraries on a USB2 External HD).  I checked and repaired HD permissions. Any ideas?

    Regarding iPhoto '11 9.5 (902.7 build running on an older Intel based MacBook Pro with iPhoto libraries on a USB2 External HD).  I am dealing with iPhoto taking too long to download photos.  Specifically, I rechecked and repaired HD permissions. I am running the most current software my five year old Intel MacBook Pro can run.   What happens is that when I connect an external SD card, or my iPhone, the new version of iPhoto takes up to two full minutes to fully acknowledge the device. Then locate new photos and be ready to download them to my external HD.  I am kind of concerned about this.  This has never happened before. 
    I take 20,000 photos a year.  I really don't want to lose any.  Or is there something I am doing wrong?  Or need to be aware of?  Any experienced suggestions would be appreciated.  Thanks.  Have a great day.
    PS.... The cameras I use are Canon SX-30, Nikon D3100, and my iPhone 4S.  Thanks again for your assistance.

    Hello Old Toad.... Those sound like great ideas. 
    I thought I checked and repaired disk permissions on my main boot HD.  That boot disk is Mac OS Extended (Journaled)  Capacity 749.3 GB.  Available 562.53 GB.   BUT.... now that I think of it.... the Seagate external HD with USB2 interface is: Mac OS Extended (Journaled), Capacity 639.79 GB, Available 36.2 GB with my latest iPhoto Library 517.37 GB that was already scanned & updated to be read by the latest iPhoto version. 
    I'll try your suggestions tonight as far as double checking 'permissions' and setting up a tiny test library.
    Or maybe it's time to fill up another External HD?
    I appreciate your and anyone else's suggestions to try.
    Have a great day. ~~ David in Rochester NY

  • After updating to Yosemite, I updated iPhoto. Alert said to convert my library to new iPhoto. Then alert said I needed to repair permissions. Then a freeze. Then iPhoto won't find and show my library. How do I fix this?

    After updating to Yosemite, I updated iPhoto. Alert said to convert my library to new iPhoto. Then alert said I needed to repair permissions. Then a freeze. Then iPhoto won't find and show my library. How do I fix this? I can see the library icon on my external drive, but it doesn't show as a library in iPhoto. When I double click on the icon, nothing happens. When I choose it from alternate menu, doesn't open. Where do I get help?

    Peter
    Do you have a back up? What version of iPhoto do you have? Assuming 09 or later:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • Can I revert back to an older version of iphoto after having updated my iphoto?

    can I revert back to an older version of iphoto after having updated my iphoto?

    Not unless you saved a copy of the old iPhoto Library. Otherwise, you can't go back.

  • How do I transfer an iPhoto '09 library back to iPhoto '08

    Got new MacBook pro with OSX 10.6 and iPhoto '09 - nice setup BUT my desktop is a G5 PPC single processor 2.56Ghz running 10.5.8 and iPhoto '08 -- now my laptop iPhoto library is not available to my desktop where all my other iPhoto libraries are:
    Can I transfer iPhoto '09 library back to iPhoto '08 library somehow?
    Or is there a way I can install iPohot '08 on the MacBook Pro?
    Any way I can just update my PPC G5 to iPhoto '09 without having to buy and then trash Garageband, iWeb and iMovie which I do not use nor want?
    Any answer or other suggestion would be appreciated. Thanks

    Look in your Applications folder for the iPhoto application. Drag it back into the Dock. If it's not there and you can't find it on your HD you'll need to reinstall it from the disk it came on.
    If you have iPhoto 8.1 on your HD try launching it with the Command+Option keys depressed so you can get the rebuild window with the options listed.
    Click to view full size
    Select the last three options and rebuild.
    If you can't get to that point in iPhoto rebuild the library with iPhoto Library Manager as follows:
    Using iPhoto Library Manager to Rebuild Your iPhoto Library
    1 -Download iPhoto Library Manager and launch.
    2 -Click on the Add Library button, navigate to your User/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File->Rebuild Library menu option
    4 - In the next window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be untouched for further attempts at fixing or in case the rebuilt library is not satisfactory.

  • HT5037 I installed the iphoto library upgrader and iphoto still will not open

    I installed the iphoto library upgrader and iphoto still will not open. can anyone solve this?

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • Empty Library after opening iPhoto

    When i open iPhoto there are no photo's anymore - all are gone. Tried to recover the AlbumData.xml file but that didn't work. Some how the system can't find 5 years of holiday pics. ;-(
    When i try to fnd Photo Library it show e only one. I did have a crash the other day and needed to restart the tough way. I hope we can still recover the pics.
    Where can i find them?

    Marco
    That crash probably corrupted the iPhoto database file. But your pics are very likely safe and sound.
    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library (Right Click -> Show Package Contents) allowing it to overwrite the damaged file.
    2. Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums back.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new library:
    Note this will give you a working library with the same Events and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    In the iPhoto Preferences -> Events Uncheck the box at 'Imported Items from the Finder'
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library (Right Click -> Show Package Contents) on your desktop and find the Originals folder. From the Originals folder drag the individual Event Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.
    Regards
    TD

  • New library, yet another iphoto bug

    I created a new library yesterday. I am doing one each month to make it easy for iPhoto as it is so buggy and horrible now. 
    I am using iphoto library manager as suggested on this community to swap between libraries as needed and it works fairly well.
    However, I am now in a situation where there appears to be 'leakage' from one library to another.
    I transferred 60 new photos to a newly created library.  The sidebar says Photos (60)
    but if I click on Photos and then start looking through them it says 3 of 82 and so on and other photos appear which I have definitely not put in this new library, seemingly at random.
    Is this a iphoto libary problem, or a general iphoto problem.? Any thoughts most welcome always.  Joanna

    My original Iphoto library has almost 14000 photos in it. I was advised not to run such a big library and to have smaller ones.
    Iphoto is good for 250,000 images. So, assuming you have sufficent hard disk space, I think you can declare yourself mis-informed
    However If I select any one photo and double click it so that it fills the screen, then a different number appears in the top right in the black menu bar that says Photos to the left and to the right it says something like 86 of (no of photos)  The two numbers don't match up.
    On the left, the number after the word Photos is the total number of items in the Library. The numer at top right is the number of images in the particular event. Thay said, I've not found iPhoto especially accurate at counting in any version.
    Furthermore, if I click through the photos in this view, I can view photos which I know I have not added to that library but are in another library. I cannot see those photos if I am in the Photos sidebar view but only if I click through using the left and right arrows in the menubar in info/edit mode or whatever it is call
    Right click on one of these images and choose 'Show Event' -  Where does that take you?
    I had that problem with the keywords which added themselves to each and every photo, and there are lots of inconsistencies with the Faces thing when the programme insists that one face has two faces and wants me to name them both, overlapping, but I can ignore that, but this particular thing is making me very confused.
    Sounds like your database file is corrupted.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Is there a way to move photos directly from one iPhoto library to another iPhoto library?

    Is there a way to move photos directly from one iPhoto library to another iPhoto library?

    Not using iPhoto - Aperture can or iPhoto Library Manager can
    LN

  • How do you import photos from a library on an external drive to the current library running in iPhoto?

    How do you import photos from a library on an external drive to the current library running in iPhoto? I have a few different pictures in each library and would like to have all my pictures in both libraries. The library on the external drive is my backup. I would appreciate any help.

    Depends on exactly what you want to do.
    Just move some of the Photos? FIle -> Export from one and export the shots to the Finder. Then import them to the other.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    Move the photos and all versions and metadata: use iPhoto Library Manager it's the only way to do this while preserving everything. Merge two Libraries into one?
    If you have Aperture 3.3 or later and iPhoto 9.3 or later you can merge libraries with Aperture.
    Otherwise the only way to merge Libraries is with the paid ($20) version of iPhoto Library Manager

  • I have two iPhoto libraries: one on the hard drive, and one on an external hard drive.  I cannot access my external hard drive iPhoto library.  Help!

    I have two iPhoto libraries: one on the hard drive, and one on an external hard drive.  I cannot access the iPhoto library on the external hard drive.  Yes, it is plugged in!

    How are you trying to access the EHD library?  Can you open it by launching iPhoto with the Option key held down and selecting the EHD library in the window that appears?
    OT

  • My iPhoto library has suddenly disappeared from my computer. When i click on iPhoto it tells me to choose my library or create a new one. However no library option appears. I have searched the computer for the library but it does not seem to exist

    My iPhoto library has suddenly disappeared from my computer.
    When i click on iPhoto it tells me to choose my library or create a new one. However no library option appears. I have searched the computer for the library but it does not seem to exist anymore. I did not have time machine set up, so there is no back up. Is there any way i can retrieve my library?
    Here is a picture of what appears when i click on iPhoto:

    In terms of searching i have searched for photos on my finder. However, none of the photos that appear are from my iPhoto Library.
    Search with FindAnyFile. You can download it here:   http://apps.tempel.org/FindAnyFile/index.php
    Search for any file with "ThumbJPGSegment" in the name. If you added at least one image to your library, the library should contain a file with this name, see OldToad's post: Re: Since I updated to iPhoto 9.5.1, my library is not listed or available. How can I find it? Can I use the time machine to restore it?

  • Library folder in iPhoto

    Question regarding the subfolders under the "Library" heading within iPhoto ......
    I have 5 "subfolders" (for lack of the proper description) ... marked 2006, 2005, 2004, 2003, "Early Photos".
    The photos have been sorted into the various "folders" according to the file date on the original .jpg file. I have no problem with this, it makes sense.
    However, everything with a file date of 2002 or earlier gets dumped into the "Early Photos" folder. I know there is a way to reassign a "file date" to older photos (say, old pics I've scanned in), and that's not the question.
    Is there a way to add "subfolders" to that Library folder so that older pics can be better sorted in the Main Library?
    Thanks in advance!
    Joseph.

    Joseph:
    No there's no way as iPhoto has hardcoded 2003 as the breakoff for the year folders in the Source pane and everything earlier in the "Early Photo"s section. You can bring up all 2001 or 2000 image by going to the calendar at the bottom of the Source pane and clicking on the year, scrolling back to the year you want and those will be in the main window. You can also narrow it down by month that way also.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application, iPhoto dB file backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

Maybe you are looking for