Skip to main content
Participant
August 5, 2022
Question

script save file without backup

  • August 5, 2022
  • 2 replies
  • 183 views

I just want to share with the community the scripts that I have made
When you save a document a backup is created automatically, this script allows you to save without framemaker creating the backup

function saveFile(file) {
    retProps = new PropVals();
    saveProps = GetSaveDefaultParams();
    var index = GetPropIndex(saveProps, Constants.FS_AutoBackupOnSave);
    saveProps[index].propVal.ival = Constants.FV_SaveNoAutoBackup;
    file.Save(file.Name, saveProps, retProps);
}

var file = File("C:\\Users\\USUARIO\\Documents\\framemakerfile.fm");
saveFile(file);

 

This topic has been closed for replies.

2 replies

Fightergator
Inspiring
August 8, 2022

Thanks for the piece of code.  I'll add it to my collection.  I can see where this would be useful in some of the work I do. 

Bob_Niland
Community Expert
Community Expert
August 6, 2022

With .backup.fm files, isn't the ‘problem’ that FM creates the backup copy on Open, or if it already exists, overwrites it on Open?

Participant
August 6, 2022
when open the .lock file is created, on save the .backup file is created