User bio
404 bio not found
Member since Apr 26, 2016
Replies:

Hi Mike,

I like your idea. However, you could get an automatic time stamp in your filename by using the $zdatetime() function. Also, I would recommend using the standard ".xml" extension on the file, since the resulting file is not actually a Cache backup file, but an export of code in XML format, similar to what you get using the Studio export option.

The following command gives you the current timestamp as part of the filename:

w $SYSTEM.OBJ.Export("MYRTNS*.MAC","C:\Users\jsinnamo\Documents\MYRTNS_"_$tr($zdatetime($h,3)," :","_")_".xml")

You can play with the second argument of the $zdatetime() function to vary the date format. Also note that I used the $translate() function to change spaces to underscores ( _ ) and also to remove colons ( : ) from the time value, since colons are invalid characters in a Windows filename. My resulting file was

C:\Users\jsinnamo\Documents\MYRTNS_2016-09-02_084755.xml

 

Best regards,

jorma

InterSystems support

Certifications & Credly badges:
Jorma has no Certifications & Credly badges yet.
Global Masters badges:
Jorma has no Global Masters badges yet.
Followers:
Jorma has no followers yet.
Following:
Jorma has not followed anybody yet.