September 13, 200124 yr Hi, I do have some basic knowledge of AppleScript with FileMaker, but this has me stumped. I've got a database made for a friend that has descriptions of hundreds of old advertisements. Each record has a unique ID. These Ads have been scanned and saved with the same name as the ID (though with a .jpg extension at the end of the file name). They are all saved on an external hard disk in a common folder called "Press Ads". Problem is that he needs to mail these out to people regularly, and finding them is painful. Is there anyway through AppleScript that I can copy them to a new folder ? Thanks in advance Partha Dasgupta
September 13, 200124 yr In the database, create 2 new fields (global - text format): 1. "from_folder" who contains the path to the folder named "Press Ads" a path looks like this : "HD_name:folder:sub_folder:Press Ads:" 2. "to_folder" who contains the path to the new folder Then try this applescript : set the_name to cell "ID" of current record set the_from_folder to cell "from_folder" of current record set the_to_folder to cell "to_folder" of current record set the_file to from_folder & the_name & ".jpg" as string tell application "Finder" duplicate (the_file) as alias to (the_to_folder) as alias end tell Jean-Marie
September 28, 200124 yr The script below wil find "Tagged" records and move the corresponding image to a folder. Or, ditch the doScript line and find your images manually, then run the AppleScript tell application "FileMaker" activate open file "SomeDrive:SomeFolder:SomeDB" do script "SomeScript ThatFindsTheRecords" set N to (number of records) set T to N repeat N times set UserImage to cell "SomeField" of record T set UserPath to "SomeHarddrive:SomeFolder:" & UserImage & ".jpg" as string set T to (T - 1) tell application "Finder" activate try move file UserPath to folder "SomeHarddrive:SomeFolder" on error display dialog UserImage & " Not Found" end try end tell end repeat end tell
Create an account or sign in to comment