• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

script save file without backup

Community Beginner ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

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);

 

TOPICS
Scripting

Views

89

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 06, 2022 Aug 06, 2022

Copy link to clipboard

Copied

when open the .lock file is created, on save the .backup file is created

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 08, 2022 Aug 08, 2022

Copy link to clipboard

Copied

LATEST

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines