March 5, 201114 yr 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
March 5, 201114 yr First, Timestamp(Get(CurrentDate);Get(CurrentTime)) is a rather cumbersome way to write: Get ( CurrentTimeStamp ) Next, in Mac OS X at least, a filename cannot contain colons.
March 5, 201114 yr And to add just a bit more to Comment's suggestion: Set Variable [$filename ; "MyDatabseBU_" & substitute( Get(CurrentTimeStamp); ":"; "-") & ".fp7" ]
March 5, 201114 yr And, of course, this isn't the best way to back up a hosted database, but it's a good technique to use while developing in single user.
Create an account or sign in to comment