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.

Renaming file script

Featured Replies

oh man.. i give up...

i just wanted to rename my exported filemaker file to include current datetime as part of its filename. i read somewhere in this forum that i could do this using applescript but hell.. i have only been a mac user for a month.. i guess its not a duration long enough for me to fully understand the language that apple uses and how does the scriptmaker functions...

think i need help here.. an applescript which renames file will be good and i will work out from there...

There are standard apple scripts for the renaming of files. Look in your programs folder, apples scripts, finder scripts and try the "trim filename" or the "Add to filename" scripts.

Good luck.

I'm attaching a file. It should be fairly simple. I ran into an odd problem, which I haven't seen before. Which was an error, type 2, when the exported text file already existed, and AppleScript was attempting to change its name.

Probably a timing problem. So I added a little AppleScript to delete the file if it exists (which is before FileMaker would export and overwrite it anyway). Then there's no error. There's no error when just overwriting from FileMaker, so it's the interaction.

The DateTime is done as text, with "_" as a separator; you can adjust to whatever.

ExportRename.zip

  • Author

wow cool.. ur script is so easy to understand unlike those sample scripts provided by apple..

thanks a million!

Well, thanks. One reason that some AppleScripts are so complicated is that they have error checking for this and that, often because they have user interaction (and one knows what trouble that can cause).

Another is that they may not be written for FileMaker, which in this case is storing critical info, such as "where is the file?" and "what is the new name?" Also the particular form for the date & time, to be acceptable in a file name. This could also have been done in AppleScript, about the same; but doing it in FileMaker keeps the AppleScript cleaner, easier to read and understand.

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.