jimlongo Posted March 5, 2011 Share Posted March 5, 2011 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 More sharing options...
comment Posted March 5, 2011 Share Posted March 5, 2011 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. Link to comment Share on other sites More sharing options...
bruceR Posted March 5, 2011 Share Posted March 5, 2011 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 More sharing options...
bcooney Posted March 5, 2011 Share Posted March 5, 2011 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. Link to comment Share on other sites More sharing options...
jimlongo Posted March 5, 2011 Author Share Posted March 5, 2011 Thank you for all your answers. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 4799 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 accountSign in
Already have an account? Sign in here.
Sign In Now