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.

Platform independent file path to temporary dir.

Featured Replies

I am interested in a temporary directory for reading and writing data files on both PCs and Macs. The default path seems to be gone in FM7 so I need a absolute file path that is always availible even for hosted files...regardlest of harddisk names, permissions, etc. My ideas are:

filewin:/C:/TEMP/Resultstemp.txt

filemac:/MacintoshHD/Temporary Items/Resultstemp.txt

filemac:/MacintoshHD/private/tmp/501/Temproary Items/Resultstemp.txt

file:Resultstemp.txt

filemac:/Macintosh HD/Applications/FileMaker Pro 7/Resultstemp.txt

file:../../../Resultstemp.txt

Hi, Bailey. Speaking for the Windows side: I've seen some instances of people not having a C:temp directory (in fact, i'm writing from a machine that doesn't have one!) I've had to do something similar to what i think you're doing, and settled on the FM directory as the best choice. Of course, we don't allow our clients to install in custom locations, so this is predictable for us; it may not be for you.

Are you using Troi File or anything similar? One thing you could do is run the SET > C:envVar.txt command from FM, then use Troi File to read the contents of that file into a field and parse out of there the TEMP= variable.

HTH,

Jerry

I don't find the first Mac one, but the longer one works. AppleScript:

alias "Macintosh HD:private:tmp:501:Temporary Items:"

There is a space in the hard drive name (usually), but you can't count on the name; people can change it. It's safer to use:

tell application "Finder"

No need for a plugin really (although the Troi file plugin is an excellent one)

use the Send Message script step to send command to the windows shell:

cmd /c echo %temp%>c:myTemp.txt

The same script (after pausing for a second or so) can then import that text file into a global.

I'm not a big AppleScript expert but I believe you can the path with something like this:

set tempPath to (path to temporary items folder)

Thanks, Wim. I didn't know you could do that with echo.

J

  • Author

I do use the Troi plugin, but not everyone I write dbs for has it and I like to avoid plugins whenever possible. I still can't understand why FM still can't specify a file path from a calculation...especially given the new FM7 File Referencing that we have (great, but incomplete). frown.gif!!!!!! But thanks for the ideas.

PS the second File Path is from the old Mac systems. Not used in X.

Wlm:

Could you please elaborate? I see script steps to Send Event and Send Mail, but none for Send Message. I assume you're using Send Event, but I'm having difficulty implementing your script step.

It would be extremely useful to be able to shell out to the OS without a plug-in!

  • 6 months later...
  • Newbies

I have the same question. How to actually issue that command to Windows (XP)? Using FMP 7.0.3.

Thanks!

-Mike P.

Hi, Mike, and welcome to the Forums!

To do this, you will need one script step, Send Event. Click on the Specify button, and in the Text field, type in whatever shell command you want, for example,

cmd /c echo %temp%>c:myTemp.txt

HTH,

Jerry

  • 3 weeks later...

On Mac, for some reason, a file reference of this format:

file:MyFile

works for Exporting data (it points to the folder that File Maker 7 is in) but it fails for importing files...

FM7: two steps forward, one step back smile.gif

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.