Broken FileMaker image refs - AppleScript to get path?

I have a situation where a served FileMaker database displays linked images which are located in a complex hierachy of folders on a separate file server machine. The file server went down and all the data was restored from backup with the exact same names and structure. Now many of the linked images are not displaying (the usual "Could not draw picture file: “image name”). There are more than 5000 records in the file, so reinserting images one-by-one is not an option.

Based on a recent experience changing folder and file names to be PC-friendly, I know that the link FileMaker uses with image references is more complex than say an html “img src” tag, which is based entirely on the file and folder names. In FileMaker it seems a folder name can be modified (as long as it’s not moved), and the image link remains.

I have an AppleScript I’ve used previously to grab the image path as a string and paste it into a text field, but it doesn’t work when the image is unable to be displayed. (I receive the following error message: “Not enough memory to complete this operation. (-108)”) The basic script looks like this:


tell application "FileMaker Pro 6"
      tell document 1
         set path_var to get data of cell "Sketch" of current record
             set cell "ImagePath" of current record to path_var as string
    end tell
end tell 
 

Is there any way I can access what FileMaker thinks the image path is?
Both the DB server and file server are running OS 9, FYI.

Thanks!
Megan

This discussion is also occurring at:
http://www.fmforums.com/threads/showflat.php?Cat=0&Board=UBB36&Number=158123&Searchpage=6&Main=158107&Words=&topic=0&Search=true#Post158123

Basically I found that converting files with broken references to FileMaker 7 allows you to see the links, either using AppleScript, or the FileMaker calculation:
GetAsText ( container field )

Then you’d have to export the links and import them to 6, or possibly use AppleScript while both are running (probably be a good idea to rename one of the apps though). Then reset the broken links in FileMaker 6 with AppleScript.