Skip to main content
Krishiee
Participant
June 5, 2017
Answered

InDesign autosave file?

  • June 5, 2017
  • 5 replies
  • 4656 views

I accidentally deleted an important file I need, and I can't seem to recover it.
Does InDesign autosave the files? If so where can I find them?

    This topic has been closed for replies.
    Correct answer BobLevine

    If you deleted them, they’re gone unless you have a backup.

    5 replies

    Known Participant
    March 14, 2023

    Dear Adobe, dont you think its about time there be an autosave folder/ option for your child InDesign? Sometimes the lil brat just has an outrage-fit an quits and the documents are lost and gone. Btw. tell your cousins and nephews over at photoshop, that all these new clothes might not make up for a cool option like autosave as well.. sometimes its time to doubledown... Thank you for forwarding my request directly to your developers team! Cant wait for this to happen, man & woman!

    BobLevine
    Community Expert
    Community Expert
    March 14, 2023

    You can make your own request but given that nothing has changed in almost 24 years, I would encourage you to learn how to keep your own backups.

    Adobe InDesign: Feature Requests: Top (4523 ideas) – Adobe InDesign (uservoice.com)

    John Mensinger
    Community Expert
    Community Expert
    June 7, 2017

    To clarify, technically speaking InDesign doesn't "autosave" a copy of your file; rather it preserves a state of your file during editing (while the file is open for editing). So, if a crash occurs while the file is open, InDesign ('s recovery utility) can recover that last-preserved state of your document. The data from which that last-preserved state is reconstructed is not a stand-alone .indd file; it's proprietary to the InDesign recovery process. It can't serve you in any way toward the recovery of a file you delete.

    Known Participant
    March 14, 2023

    yes, but can you recover from a program menu? No as I have learned it only opts to recover after crash/ restart. Once you missed that its gone forever...

     

    winterm
    Legend
    June 5, 2017

    Or, like with any other deleted file(s), you can try some free app for file recovering, something like Recuva from Piriform.

    Success not guaranteed, your mileage may vary.

    Loic.Aigon
    Legend
    June 7, 2017

    I would definitively give such apps a try. I could get back precious documents like this.

    winterm
    Legend
    June 7, 2017

    Yeah, chances are pretty good if you do not wait too long and files still aren't actually overwritten...

    BobLevine
    Community Expert
    BobLevineCommunity ExpertCorrect answer
    Community Expert
    June 5, 2017

    If you deleted them, they’re gone unless you have a backup.

    Participant
    March 14, 2023

    I know it's been a long time since the original post and there is still no autosave for InDesign documents. However, there is an old script by Martin Fischer, "save with backup.jsx", which at least saves the versions of the document as it is saved, so that everything you have done is not lost. The original link has been deleted. Now there is a webpage in German with a script by the same Fischer with similar function, but scripted differently and older (2009): https://indesign.hilfdirselbst.ch/ausgabe-export/automatische-sicherungskopien-in-unterordner-erstellen-1.html. I have the English version with me, but I don't know if it will be useful for you or if I can upload it here.

    rob day
    Community Expert
    Community Expert
    March 14, 2023

    Hi @HNS2000 , A timed auto save could be scripted using an idleTask listener—idleTasks events can be triggered at set intervals. This example would save a document roughly every 2 min.

     

     

     

    #targetengine "session"
    
    //The save interval in secounds—120 saves every 2 min
    var saveTime = 120;
    
    //make a new idleTask. The task name and the sleep time
    var iTask = makeIdleTask("autoSave", saveTime*1000)
    iTask.addEventListener(IdleEvent.ON_IDLE, autoSave);
    
    
    /**
    * Saves a copy of the active document in the saveTime increment
    * @ param the idle event 
    * @ return void 
    */
    
    function autoSave(e){
            if (app.documents.length > 0) {
                var d = app.activeDocument;
                if (d.saved) {
                    d.save()
                    //alert("AutoSave ")
                } else {
                    alert("This file has not been saved")
                }
            }
    }
    
    
    /**
    * Make a new named idleTask 
    * @ param the task name 
    * @ param the sleep time 
    * @ return the named idleTask
    */
    function makeIdleTask(n, s){
        var it;
        try {
            app.idleTasks.add({name:n, sleep:s})
        }catch(e) {
            it = app.idleTasks.item (n);
        } 
        return app.idleTasks.item (n);
    }

     

     

    You could start it manually from your Scripts panel, or it could be saved in the startup scripts folder and it would automatically run every time you start InDesign.

     

     

    If you want incremental backups the active document, this version would create a backup folder in the same directory as the InDesign file and do a Save A Copy to that folder at the set interval. The file name gets appended with a time stamp:

     

     

     

     

     

    #targetengine "savecopy"
    
    //The save interval in secounds—120 saves every 2 min
    var saveTime = 120;
    
    //make a new idleTask. The task name and the sleep time
    var iTask = makeIdleTask("autoSave", saveTime*1000)
    iTask.addEventListener(IdleEvent.ON_IDLE, autoSave);
    
    
    /**
    * Saves a copy of the active document in the saveTime increment
    * @ param the idle event 
    * @ return void 
    */
    
    function autoSave(e){
        if (app.documents.length > 0) {
            var d = app.activeDocument;
            if (d.saved) {
                var f = makeDocFolder(d, "Backup");
                var dn = d.name.replace(/\.[^\.]+$/, '');
                var fn = dn + "_" + timeStamp()
                d.saveACopy(File(f+"/"+fn))
            } else {
                alert("This file has not been saved")
            }
        } 
    }
    
    
    /**
    * Make a new named idleTask 
    * @ param the task name 
    * @ param the sleep time 
    * @ return the named idleTask
    */
    function makeIdleTask(n, s){
        var it;
        try {
            app.idleTasks.add({name:n, sleep:s})
        }catch(e) {
            it = app.idleTasks.item (n);
        } 
        return app.idleTasks.item (n);
    }
    
    
    /**
    * Get a date string. Format is 03-14-23_11-31
    * @ return date string 
    */
    function timeStamp(){  
        var date = new Date();  
        var m = date.getMonth() + 1;  
        var month = (m < 10) ? '0' + m : m; 
        var yy = date.getYear();  
        var year = (yy < 1000) ? yy + 1900 : yy; 
        var ya = year.toString().substring(2, 4) 
        return month + "-" + date.getDate() + "-" + ya + "_" + date.getHours() + "-" + date.getMinutes();
    }  
    
    /**
    * Creates a folder inside of the active document’s parent folder 
    * @ param the active document 
    * @ return the folder’s path 
    * 
    */
    function makeDocFolder(d, s){
        var dp = d.filePath;
        var n = d.name.replace(/\.[^\.]+$/, '');
        tf = new Folder(dp + "/" + n + " " + s);
        cf = tf.create()
        return tf
    }
    

     

     

     

     

     

     

    kglad
    Community Expert
    Community Expert
    June 5, 2017