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.

Save a File with a filename that contains a variable?!

Featured Replies

I want to make a script that will backup the database [save A Copy As] with a press of a button to a given location. I want to name the saved file BackUp_$TodayName.fp7, where $TodayName gives for example "Thursday".

Is there anyway that it can be done?!

Define a variable $filename as the complete pathname of the file, for example,

Set Variable[$filename;Value;"filewin:/C:/Path/BackUp_" & $TodayName" & ".fp7"]

and then use Save a Copy as

Save a Copy as["$filename";copy]

Here fill in the location between filewin:/ and BackUp_. In the Save a Copy as, when you specify the Output File simply type $filename into the Output File Path List.

  • Author

Excellent, thank you VERY much!

Jim--

The Set Variable step is a FM8 feature. Ted's profile lists him as using 7, so, your answer won't help him.

I know of no way to accomplish Ted's goal without some plug-in. Please correct me if I'm wrong!

David

You are right about variables being FM8 feature, however, the use of $TodayName in the formula made me think that FM8 was being used despite the FM7 declaration in the profile.

I do not know any way to achieve this in FM7 without external help, either an OS script or a plug-in.

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.