Deborah,

this works...

Substitute(Get ( FilePath );".fp7";"") & "_" & Year(Get (CurrentDate)) & Month(Get(CurrentDate)) & Day(Get(CurrentDate)) & Round((Get(CurrentTime)/86400);6) & ".fp7"

Stephen

On Mar 21, 2007, at 10:08 AM, Deborah Tinsley wrote:

Okay, I got this script to Back up an open file from Matt Petrowsky. It worked beautifully, but it named my file "]". How do I get it to rename the
back up file something meaningful?
(Using 8.5 on Mac OSX)



#DEPENDENCIES: ZeroPad (Custom Function)
#ABOUT: This script will create a duplicate of your current database. It
will save the copy into the same folder as the original
#------------------------------------
Set Variable [ $with_data; Value:"On" ]
Set Variable [ $path; Value:"/*Let( ¶[ ¶now = Get ( CurrentTimeStamp ) ; ¶year = ZeroPad( Year ( now ) ; 2 ) ; ¶month = ZeroPad( Month ( now ) ; 2 )
;
¶day = ZeroPad( Day ( now ) ; 2 ) ; ¶hour = ZeroPad( Hour ( now ) ; 2 ) ; ¶mins = ZeroPad( Minute ( now ) ; 2 ) ; ¶secs = ZeroPad( Seconds ( now ) ; 2 ) ¶] ; ¶ ¶Substitute ( Get ( FilePath ) ;¶ \".fp7\" ; ¶ \"_\" & year & \"-\" & month & \"-\" & day & \"_\" & hour & \"-\" & mins & \"-\" & secs &
\".fp7\"
¶ ) ¶ ¶)*/" ]
#------------------------------------
If [ $with_data = "On" ]
Save a Copy as [ “file:$path” ]
[ compacted copy (smaller) ]
Else
Save a Copy as [ “file:$path” ]
[ clone (no records) ]
End If

Deb


Deborah Tinsley
Assoc. Librarian of Visual Resources
Kansas City Art Institute
[EMAIL PROTECTED]
816 802 3395

-------

"The nice thing about standards is that you have so many to choose from." -Andrew S. Tanenbaum, Computer Networks, 2nd ed, p.254

Reply via email to