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.

Mac OSX "file info" data extraction and import?

Featured Replies

  • Newbies

Is there a way to extract the data from a documents "get info" and import into FMP?

FileMaker Version: 7

Platform: Mac OS X Jaguar

If on Mac, type the following into AS Script Editor:

set theInfo to info for (choose file)

It returns a "record," which is a series of named pieces of date: name, name extension, file type, etc.. Each item can be accessed via its label.

Then it's just a question of setting them into corresponding FM fields. The simplest example, in a Perform AppleScript step:

set theInfo to info for (choose file)

tell current record of document 1

I also discovered that getting the "kind" from the info kicks up an error when run in a FileMaker Perform AppleScript step; but not in Script Editor. So just put all whole "info for" block inside a tell "Finder" call.*

That's probably 'cause "kind" is a command to get the "class" of an object in FileMaker; sometimes command keywords conflict. You've also got the file type, creator and extension; but sometimes those are missing these days, so kind is more reliable, if a little verbose.

*The FileMaker commands don't need to be in a tell "FileMaker Pro" block, unless when testing scripts in Script Editor. FileMaker knows who it is. I put them outside, then remove them.

And, while I'm at it :-), the default application returns an alias, which you have to coerce "to text" or "to Unicode text" to put into FileMaker. The dates are a date|time stamp, so they also benefit from a "to string." I also coerced size, since I divided it by 1024 for K.

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.