AnsweredAssumed Answered

Applescript to create a folder

Question asked by willrollo on Feb 28, 2013
Latest reply on Mar 5, 2013 by willrollo

Title

Applescript to create a folder

Post

     Hi

     I have a working script to automatically create a folder that is named after the field content of a record.
     I need help with two aspects. Firstly, I want to change the folder that myfile is saved in - (I want to add a subfolder)

     Secondly, I shall be running the database from FM server located on a new mac mini server. This folder, mentioned above will therefore need a new path that points to the server . How do I write this path?

      

      
     MY CURRENT SCRIPT
     --tell application "FileMaker Pro Advanced"
     set folder_name to cell "Name_ShortReversed"  of current record
     --end tell
      
     set Doc_path to Documents
      
     tell application "Finder"
     try
     make new folder at "Users:myname:Desktop:Enquiries:" with properties {name:folder_name}
     end try
     end tell
      
     I want the folder structure to be altered to this:Users:myname:Documents:Enquiries
      
     Not sure how to implement this due to the Set DT to desktop line..
     And to alter the path to the server - If I right click the file on the server, from my client, I get this:
     afp://Server._afpovertcp._tcp.local/Users/mycompany/Documents
      

Outcomes