AnsweredAssumed Answered

Telling the finder to move a PDF to a new folder prior to creating a link to FileMaker

Question asked by RPrevereau on Oct 15, 2009
Latest reply on Oct 15, 2009 by FentonJones

Title

Telling the finder to move a PDF to a new folder prior to creating a link to FileMaker

Post

Hi,

 

I've created a simple database to keep track of my reading notes in which I have a script that links each record to the PDF of the given article (using the "insert image"), so that I can open it from within the database. Now, considering the number of PDF's I have to manage, I would like to move those that are linked to my database from a folder named "PDF to link" to a folder named "PDF linked" as I create the link to my database records. The AppleScript for this latter option goes as follows:

 

tell application "Finder"
    set _file to choose file with prompt "Select the PDF to move" without multiple selections allowed
    move file _file to folder "PDF linked" of folder "A" of disk "B"

    set _PDFpath to _file

end tell

tell application "FileMaker Pro"

    activate

end tell

 

That Applescript works pretty well, since the selected files are moved each time to the desired folder. The troubles begin when I try to create a link in FileMaker to the PDF that I just selected and moved. For I don't want to need to select that same PDF again. Instead, I want FileMaker to create the link based on the new pathway of the file I selected a second ago. Hence the step "set _PDFpath to _file". But I just can't figure out how to make FileMaker use that information to create the link to the PDF. Anybody knows how?

 

Raynald

 

Running FileMaker Pro 10 under Mac OS 10.6

Outcomes