Jump to content

Saving $filename in a script


This topic is 4355 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a backup script that runs when the file is opened which saves a copy of the file.

I want to save the name with a timestamp so I'm setting this variable in the script:

Set Variable [$filename ; "MyDatabseBU_"&Timestamp(Get(CurrentDate);Get(CurrentTime))&".fp7"

Save a Copy as [$filename;copy]





This returns the error




“MyDatabseBU_03-05-2011 3:10:58 PM.fp7” could not be created on this disk.  Use a different name, make more room on the disk, unlock it or use a different disk.

If I change Save a Copy as [filename;copy] it saves a file called "filename" so the path seems correct.

The full path on my Mac is file:../Documents/FM_Backup/$filename

thanks for any pointers,

jim

Link to comment
Share on other sites

And to add just a bit more to Comment's suggestion:

Set Variable [$filename ; "MyDatabseBU_" & substitute( Get(CurrentTimeStamp); ":"; "-") & ".fp7" ]

Link to comment
Share on other sites

This topic is 4355 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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