Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

AppleScript File Path OSX

Featured Replies

  • Newbies

Hey, there.

A client recently upgraded from OS 9 to OS X. We are using an applescript to move data from Filemaker 6 to MYOB AccountEdge v2. The file path specified is no longer valid given the new directory structure in OS X, but I can't seem to find what the correct path name is? I get an error message "Can't find the file..." when I run the script.

I have tried using the path provided by Get Info and have also added the path provided by terminal: pwd, no luck.

Help, anyone?

sb

here's the problem part of what we have:

property MYOB_Data_FilePath : "Orion:Server:A Accounting/Invoicing Stuff:ATM Inc. Data/V9"

tell application "FileMaker 6.0v4"

activate

open MYOB_Data_FilePath as alias given

Your path has both old style Mac dividers ":" and Unix dividers "/". AppleScript uses the old style ":". You can convert Unix to Mac, or Mac to Unix. These 2 lines show how:

set PX to POSIX path of (choose file) -- Mac path to Unix ("choose file" returns a Mac path)

set theMac to POSIX file PX -- Unix to Mac (PX is a variable with a POSIX path in it)

(PX above is a file reference, add "as string" if you want text)

I don't know about your raw <<class usrn>>, etc..

FileMaker 6 only has a password. For example, this is a droplet app, for opening dropped files:

on open (theFiles)

tell application "FileMaker Pro"

activate

open theFiles with password "Howdy"

end tell

end open

FileMaker 7 has an Account and a password (but they are plural; don't know why):

on open (theFiles)

tell application "FileMaker Developer"

activate

open theFiles with passwords "Howdy" for Accounts "fenton"

end tell

end open

I have FileMaker Pro 6 and FileMaker Developer 7, so there's no conflict between them. If you have FileMaker Pro 6 & 7, then you need to do this:

on open (theFiles)

tell application "Finder"

ignoring application responses

launch application file id "FMP5"

end ignoring

tell application "FileMaker Pro"

activate

open theFiles with password "Howdy"

end tell

end tell

end open

And they'll still be confusion if both are open.

  • Author
  • Newbies

cool, let me give this a shot. thanks for the feedback.

When I want to find a path name I just create a script like

choose folder

or

choose file

And then just copy the path from the result window

Another little method, to get the path from a file in a visible window, is to create a script file, then put it in your Scripts folder (which should be in your menu bar, if you've turned that feature on; if not, look in the Help, it can do it for you). Then, when you need the path, click once on the file, and run the script. The path will be on the clipboard. It just does one file - one path.

tell application "Finder"

try

set theFiles to get selection

set theFile to item 1 of theFiles

set the clipboard to theFile as string

on error errmsg number errnum

beep

display dialog errmsg & " " & errnum buttons {"OK"} default button 1 with icon caution

end try

end tell

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.