AnsweredAssumed Answered

Deleting External Files - Filename in Container Field

Question asked by GarethForwood on Jan 23, 2011
Latest reply on Jan 28, 2011 by GarethForwood


Deleting External Files - Filename in Container Field


Hi All,

I have a photo database that I have set up in FM Pro, with container fields displaying the Jpeg Images.  Filemaker doesn't display the original of any image, but instead shows either a 200px wide image in List View and a 1200px image in the Forms.  There are several images now that I do not want to keep - I therefore need to delete the record, the 200px and 1200px images and the original image.  The filepaths for the 200px and 1200px images are stored in containers within the database. 

Now, there is another complication - at some stage I started taking my photos in Canon's RAW format, with the file extension .CR2.  This means that some of the original images have the .jpg extension, and some .CR2.

Is there any way that I can write a script that will simultaneously delete all the files (preferably send the files to the Trash in case I make a mistake) and the record, and that will not be affected by the variation in the file extensions for the original files?

I have heard that Applescripts are needed for this sort of thing but I have never used them before - is there any guide (either from FM or externally) that provides a good intro to using Applescripts with FM Pro?

Thanks in advance,