Testing file existence in an iPhoto album, removing, and importing

I want to write an AppleScript to import a photo into an album. If a photo with the same file-name already exists in the given album, I want to remove the existing one first, then proceed with the import. I tried:
if album "MyAlbum" contains "pic1.jpg" then
remove "pic1.jpg" from album "MyAlbum"
end if
but that doesn't compile. Help?

You may get a better response if you post it over in the Applescript forum which can be found here...
http://discussions.apple.com/forum.jspa?forumID=724
Good luck,
Patrick

Similar Messages

  • I've tried to place an iphoto album order and it quits half way through the up

    I've tried to place an iphoto album order and it quits half way through the upload process.  A prompt comes up saying "iphoto quit unexepectedly".  It always quits at the same spot, page 17.  I've tried many times.  It worked last year when I made the same type of photo album.  Anyone have any ideas?  I have a MAC OS X 10.6.8
    thanks!

    What version of iPhoto?
    can you preview the book - http://support.apple.com/kb/HT1040
    LN

  • I have already assigned photos from iPhoto to folders in Pictures on the Mac using the instructions from Adobe. How do i now move more recent photos from iPhoto without duplication and import into Lightroom?

    I have already assigned photos from iPhoto to folders in Pictures on the Mac using the instructions from Adobe. How do i now move more recent photos from iPhoto without duplication and import into Lightroom?

    If the images are in the location you want them be sure to select "Add" at the top of the import dialog box.

  • Export the file names of an iPhoto Album

    Hi,
        I have gone through some of the communities but did not find the answer and posting here. I want to export only the file names of photos of an iPhoto Album.  (Please post if I can get them through Terminal)
    Thanks
    Raj.

    That is not a feature of iPhoto
    And there is no work around. IPhoto is all about photos. Not at sell about files
    LN

  • 2 things: iPhoto isn't automatically copying all my imported photos into an iPhoto album folder AND ever since i upgraded my MacBook 120GB to Snow Leopard, iTunes won't recognize my iPhone.

    So i have a 120GB MacBook that's about 4 years old (just updated to Snow Leopard--been working in Iraq, i'm a little behind).
    Never had a problem with it.
    I also have an iPhone 4 which i've had for about a year (up-to-date software as of about a month ago).
    Never had a problem with it.
    I've had iTunes for years of course (up-to-date).
    Never had a problem.
    1.
    Now my iTunes won't recognize my iPhone since the Snow Leopard update.
    iPhoto will recognize my phone, but iTunes won't.
    Went through all the preferrences and i can't find anything that isn't set properly.
    iTunes Helper is used during startup.
    Everything seems fine.
    Any help?
    2.
    I use a WD external hard drive to back my Mac up every week or so.
    I recently realized that half of my pictures from iPhoto are not copied to the external.
    They haven't been transfering over.
    So i snooped through my folders and as it turns out, iPhoto hasn't been copying the pictures i import from my iPhone to iPhoto and saving them as .jpg files in the pictures folder (or iPhoto album or whatever) like i think it's supposed to.
    My pictures folder has approx half of all my pictures in it, meaning at some point (probably 2 years ago) iPhoto stopped making the file copies of my imported pictures.
    I do not know why.
    No idea how to fix it.
    If i were able to fix that (with your help), would all the pictures that haven't been copied automatically copy to my pictures folder once i had the issue resolved or would there be a lot of dragging and dropping?
    I've been clumsily and sloppily copying all my pictures to a new folder on my desktop and manually transferring that folder to a thumb drive (which i keep in my pocket) and my external (just so i have them in some form) in case my computer crashes or a mortar shell lands on my room and blows my computer up.
    Can anyone please help me with any of this?
    I can't just stoll down to the Apple store to ask the Genius Bar (I'm in Baghdad) and i don't have Apple Care so no one will help me on the phone when i call Apple.
    Thanks so much.

    hey mill1640,
    Did you ever get your iPhone to register with iTunes? I just upgraded as well to Snow Leopard, and my my isn't recognized at all also.
    If you did get this resolved, I would appreciate a little suggestion in the right direction.
    Many thanks,
    Josh

  • IPhoto album backups and duplicate photos

    Hello,
    After uprading to iPhoto 6, I went through the whole library and put it all into about 15 separate albums. I've only got about 2000 photos, but it was still a lot of work. After I had done this, I started making a calendar, which for some strange reason make iPhoto practically refuse to run, so I had to re-install. (ther people on discussions have had the same problem, and the common factor seems to be trying to make a calendar).
    After the re-install, I re-imported all my photos back into iPhoto. I'm not going to try and make a calendar straight away, as before I do, I really want to back up my Albums.
    Does a straight complete backup of the iPhoto library folder back this up for me? If not, can anyone tell me how this can be achieved?
    Secondly, after re-importing all my photos, the photos that I had previously edited now are present in two forms; the original and the edited one. Unfortunately it is too late to re-import my library having deleted the folder "Originals". I didn't think of it at the time!
    Does anyone know of a way to delete duplicate photos, or how I could at least get them all side by side, as a lot are spaced out and therefore it can be hard to compare and see if they are duplicated.
    Any ideas would be hugely appreciated, as this is really stopping me using iPhoto that much at the moment.
    Many many thanks for any help, it will be extremely gratefully received!!
    Regards,
    Adam Dalton

    Hi Adam,
    All you need to do is backup the entire iPhoto Library folder. This will preserve everything. If for some reason you need to use this backup then you would place it in the Pictures folder and launch iPhoto. iPhoto will launch and open the library. there is no need to import all your photos again.
    If you have an iPhoto Library folder already in the Pictures folder, but you want to replace it or it is damaged, then drag that folder to the desktop and drag the backup into the Pictures folder, then launch iPhoto.
    Bottom line...back up the iPhoto Library folder in the Pictures folder. do it often.
    As far as the duplicates you have now, do you have your view set to film rolls? I would think since the film roll name is the same they would be next to each other. How about putting the name of the roll in the search field? You should get the contents of both modified and Originals from the rolls. You can then delete what you don't want.
    Backing up your iPhoto Library
    1. Burn the iPhoto Library folder in the Finder to a CD or DVD
    This method will give you a burned iPhoto Library folder that can be copied back to your computer to replace a damaged library. You can also use this method to backup an old library when you want to create a new Library to use as your current library.
    insert a blank CD into your internal or external CD-RW drive and copy the iPhoto library to the CD icon on your desktop. When you drag the CD icon to the Trash/Eject button in the Dock, you are given the option to burn the CD. Click Burn and the CD is created. To burn a DVD backup of your digital images, use a DVD and a SuperDrive-equipped Mac
    The easiest way to burn an iPhoto Library folder in the Finder that is larger than 4.7 gig to fit on one DVD is to burn sections of the folder.
    Drag the iPhoto Library folder to the desktop
    Double click the folder to open it.
    Drag each Year folder to the desktop.
    You should be left with the iPhoto Library folder containing all the data files, and the Year folders.
    Combine whatever year folders that amount closest to a DVD burn size on one DVD. Make sure that you have burned all the Year folders, then the iPhoto Library folder with all the data files.
    If you ever need to use this backup, insert the DVDs into your computer and copy the folders to the desktop. Put all the Year folders back into the iPhoto Library folder. Then put the iPhoto Library folder back into the Pictures folder.
    2. Copy the ENTIRE iPhoto Library to an external drive formated for a Mac. Do not use this as your only back up as the external can also go bad.
    3. Copy the ENTIRE iPhoto Library to your iPod in disk mode
    4.Creating your own CDs and DVDs for viewing in iPhoto
    This method is a great way to back up Albums of older photos or even your entire library if it is small enough to fit on a DVD. This method will give you a library that will mount within iPhoto in the source column to be viewed. To import any images from this library they need to be dragged into your library in the source column.
    If you just want to backup the images in your library:
    1) Within iPhoto select the images, albums or rolls you want to backup. Go to Share>Export and export them to a newly created folder on the desktop. Follow the directions in the next link.
    Creating a CD or DVD to be viewed in Windows or by a photo processing company

  • How to reload metadata without removing and importing again

    Hi,
    Is there anyone out there who can help me with this little problem: When I'm shooting outside I always have my Garmin GPS with me in order to make a tracklog. This way I can geocode my pictures with a program that apply the GPS position to the metadata in my dng files. But the changes in the metadata doesn't reflect in Lightroom until I remove the files and import them again. Is there a smarter way to do this?
    Rgds,
    Morten Rasted
    Copenhagen, Denmark

    I did a quick search for Lightroom GPS and there are a few articles about it including:
    http://lightroom-news.com/2007/03/23/gps-metadata-in-lightroom-and-google-maps/
    Richard Earney
    http://inside-lightroom.com

  • Iphoto - export pictures and import in an other mac

    is it possible to export pictures which are stored on one mac in the iphoto lib and to import them an an other computer. So that i can manually sync the folders.
    Or does any one knows an other way to sync (both directions)
    Thanks
    Hans

    is it possible to export pictures which are stored on one mac in the iphoto lib and to import them an an other computer. So that i can manually sync the folders.
    Yes - you just export them from iPhoto on computer 1 - move them to the other computer and import them into iPhoto there
    There is no way to sync
    If the computers are connected in some way you can use iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ - -to move photos between the libraries
    LN

  • Test file existence before opening it from servlet

    Hi experts,
    I have a servlet which has to open a text(say test.txt) file stored in the root(/report/2002/currentmonth/test.txt).if it is over 30 MB then it has to split the file in to two halfs.
    for example if test.txt is of 57 MB then it has to split the file in to two. For not i split it manually and saved it in the same folder as testpart1.txt and testpart2.txt.
    can you please explain me the way I can force my servlet to check for the file size and to prompt to open Part1 and part2 if the file is over 30 MB.
    is there anyway I can split the file dynamically and store them as two temporary files and prompt the same for opening instead of splitting them manually. Any help would be appreciated.
    Thank you very much for your earliest response. Thank you.
    -Sreekanth Varidhireddy

    if you are using java.io.File it has a method length() that will return the file size.

  • Testing file existence from client side

    hi
    Is it possible to test whether an arbitrary file or directory exists (and is readable by oracle user) on the database server file system from an Oracle client application? I would need to do this on 10gR2 and 9iR2.
    br. aspa

    To test for a directory query the dictionary view ALL_DIRECTORIES
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch241.htm#1291666
    To test for the existance of a file either try to open it in read mode using UTL_FILE or
    use Tom Kytes DirList utility for a list of files in the particular directory
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:7506780031005

  • Iphoto albums did not import to photos app

    I updated to OS X 10.10.3 as suggested.  This replaces iPhoto with the Photos app.  The Photos app said it was adapting my iPhoto library to Photos.  I have 15,700 photos.  The process was very slow so I left it running. 
    When I returned several hours later, the Photos app was open but had no library.  I was offered the 4 basic options including import.  When trying to import photos, the finder window showed the old iPhoto library, but it was greyed out.  How do I get my 15,700 iPhoto images into Photos?

    Don't use the import panel, switch to your iPhoto Library.
    Either drag the iPhoto Library to the Photos icon in the Dock,
    or quit Photos, then hold down the alt/options key while double clicking the Photos icon in the Dock.  Select the iPhoto Library from the Library chooser panel.
    Photos should have migrated your library automatically, Either it did not migrate the correct library, because your iPhoto Library could not be found or opened, or your iPhoto Library has a corruption.
    Where is your iPhoto Library stored? In the default location, your Pictures folder, or on an external drive?  If external drive, is the filesystem correct (MacOS Extended (Journaled)) or do you keep the library in a partition that is formatted for Windows?  Is the drive locally mounted or a network volume?

  • Album backup and importing after formatting

    I am planning on reformatting my computer in the near future, but I want to backup my photos first. If I burn photo albums to a DVD using iPhoto, will I be able to import those same albums (and the photos in these albums) after reinstalling? Or will I lose all of my albums but merely retain my photos in some random order? I am using OS 10.3.9 and iPhoto 4, by the way. Any help would be greatly appreciated.

    Actually, since you said you were wanting to move your photo collection off of your startup partition, the instructions suggest by OT will only get you part way there. Moving your collection to a different drive partition will copy your iPhoto Library folder rather than move it. Before restarting iPhoto, you'll have to include the additional step of renaming your original iPhoto Library folder (or drag it to the desktop) so iPhoto doesn't find it when it starts. After you've checked with iPhoto to make sure the move occurred without incident, you can delete your original iPhoto Library folder from your startup disk/partition.

  • ITunes for Windows freezes when importing a library. I have a large but not huge library of mostly iTunes purchased music on two authorized computers and would like to sync the files, export the library as a playlist, and import it on the other computer.

    I am running iTunes for Windows 10.2.2 on Windows 7 Home. I have my iTunes library on both this computer and another authorized machine running Windows 7 Professional. I have a large but not enormous library, as I'm one of those people who doesn't pirate, use torrents, borrow from a dozen friends, or whatever other shades of gray you might imagine. It's mostly iTunes purchases with my old CD collection imported. I have started using the following technique to sync my libraries between my two authorized computers, an ability which you can probably all agree should one day be added to iTunes -- that would be different from Home Sharing, because the music would be stored locally and thus available on the road. With the added benefit of the entire library being backed up on the other machine in real-time. Anyway, when I switch from my desktop to laptop and vice versa, I use the following technique:
    Connect both machines to the home network. One machine is the "Active" machine, which has most recently been used for iTunes media, purchases, ratings, etc.
    On the "Active" machine, File-->Library-->Export. Save the file as "Library.xml" on the shared drive of the other machine.
    Right-click "Library.xml" where it's been saved, and open another file that has two lines in it: The root path of the iTunes library on one machine and the root path of the iTunes library on the other machine.
    Do a find/replace all in Notepad to make the library XML file point to where the files will be saved on the "Inactive" machine.
    Run Microsoft SyncToy to synchronize the files between both music libraries; the most recent files win. This avoids copying the entire multi-gigabyte library over the network.
    Open iTunes on the "Inactive" machine.
    Go to Music, Select All, Delete. Keep files.
    Do the same for Movies, Music Videos.
    Go down to Playlists, select the top one, hold down the delete button until they're all gone.
    File-->Library-->Import Playlist. Choose the "Library.xml" file you saved.
    First a status bar comes up that says, "Importing library." It has the continually-scrolling progress bar, not the one that starts on the left and steadily creeps right. Then after about 30 seconds, that clears out. Wait. Typically a few minutes. Eventually a status bar will pop up saying something like, "Evaluating gapless playback information," or something like that.
    The "Inactive" computer is now the "Active" computer. I can now play my library, it has all my playlists and metadata from the other machine.
    Delete all the duplicate playlists named "Music," "Genius," "Purchased," and "iTunes DJ."
    Well, I just upgraded to iTunes 10.2.2 a few days ago and tried to do this again like I've done it dozens of times before. Now, iTunes just goes unresponsive after the library import. It got through the "Importing library" bar to the long wait and stopped. I can still multiprocess and use other programs, but iTunes is hovering back there not responding to clicks. Task Manager doesn't seem to think iTunes is using my CPU, and I don't see my hard drive rattling. Any thoughts on why iTunes might hang up when importing a large library?
    ... Also, please help lobby Apple to come up with a network sync tool built into iTunes for a user with multiple authorized computers. Something different than Home Sharing so I can pull my laptop off the network and still have the synced library with me. And all my metadata changes will sync. The technique I use seems a little kludgey, don't you think?

    iTunes isn't an editor. You need an app that's intended for editing audio files, like Adobe Audition (http://www.adobe.com/products/audition.html) or Audacity (free in the App Store).

  • Restoration of iphoto albums after disk repair

    I had a serious disk problem that required complete wiping of the disk and then restoration of the original files from Time Machine. My photos (14GB worth) are now organised into years (2003,2004, etc) only and not the original titled albums. What is the file that contains the original album titles and content and where should it be located in order for iphoto to read it? The file should still be there on Time Machine. Any help appreciated to avoid manually re-allocating files to albums even if I can remember which is which.

    YOu need the iPhoto library intact - there is no file that contains albums - you must restore the database as a single entity
    Typically you open TM and go back to a good date, select the iphoto library and click "restore"
    LN

  • How to order iphoto albums by date?

    I have resorted my Iphoto albums over and over. They STILL rearrange themselves. What am I doing wrong? Heck.

    iPhoto 1.0 did that automatically until iphoto 4 or so... it even sorted photos in dated folderes using exif data. For whatever reason a "brilliant" person in apple decided  to date the folders with the importing date, some absolutely useless. And also decided to take out the calendar feature and created the also useless events concept, which is ok for a couple of mum and dad pictures, but useless if you have thousands of pictures and hundreds of events and projects.
    Aperture mimics iPhoto and missed this too for the sake of compatibility. Flickr has way better sorting capabilities in that respect than Aperture & iPhoto. In flickr you have a calendar where you see all pictures by date...  something absolutely ease to implement in both Aperture and iPhote but Apple decided not to.
    Halfway Solution: Smart Folders and show date under every picture. That way if you create a Smart Folder 2012 (11) NOV: inside you will see all pictures of that month and you can spot fast the pictures shot on Nov the 10th.
    This is the way a name folders and pictures:
    Year (Month Number)  Month's Name 3 first letters - Day of the Week 3 first letters - HourMinuteSecond - Event Name or Activity - City - Country
    2012 (11) Nov Sun 13h23m34s - 11 Apostoles - Great Ocean Road - Victoria - Australia
    I've being naming my pics this way for the last 10 years and I spot instantely where I have take every picture just reading the name. You can use IPTC and Aperture or other rename app.
    I name folders like this:
    Year (Month Number)  Month's Name 3 first letters - Event or Activity o Proyect
    2012 (11) Nov - Event or Activity o Proyect
    Using Month Number sorted folders and pictures by date.

Maybe you are looking for

  • VERY URGENT!! How to Pass a "% " symbol from form to Report

    Hi I am using oracle 10g and passing a symbol "%" as a parameter to the report from a form. But it shows error as follows: REP-52006: Failed to decode the specified URL PARAMETER1=%. But it is working when it runs in the Report directly. Then Why we

  • Got excited to see Camera Raw Update 5.0.3...

    Unfortunately support for the Pentax K-3 wasn't in this release. Does Apple have a schedule to provide RAW support for the Pentax on the horizon?

  • Validate XML against XSD with imported xsd's

    Hello, I'm stuck for a while attempting to validate a xml against some xsd's. In the code below you can find my xsd's structure: (I need to use this structure in order to reuse the baseXsd's files. CommonTypes.xsd <?xml version="1.0" encoding="utf-8"

  • Web Server Issue

    Guys, I am facing a little problem related to Apache Web Server. When we configured Reporting and Analysis tool, the results showed Web server as succeded. But i could not see Apache in the services list and hence could not start. As a result i am ge

  • Unable to run servlet in Tomcat

    I've installed Tomcat and ran the examples fine, Ialso created some test jsp files and placed them in C:\tomcat\Tomcat-4.1\webapps\ROOT\test and then ran them calling http://localhost:8080/test/Hello.jsp which worked fine. When I place servlets into