So I was using Texstudio to write an article and the computer just froze. I had to restart the computer, my 2 hour work was gone. I was stupid enough to not save it at all...

Does anyone know if Texstudio auto saves your document like MS word? Is there a way that I can recover it? (I built it countless times when I was writing the article.)

  • 2
    Welcome to TeX.SE. I've edited your posting lightly and deleted the thank-you-in-advance line -- on this site, the best way to say "thank you" is to upvote answers you find helpful and to "accept" the answer that best solves the issue(s) you've raised. – Mico Jul 5 '14 at 5:38
  • I don't think it can be recovered. – hola Jul 5 '14 at 7:18
  • If you built it, it should be saved somewhere. That file might be corrupted though. – Juri Robl Jul 5 '14 at 8:45
  • An issue requesting this feature is open on the project's github page: github.com/texstudio-org/texstudio/issues/644 – Mira Weller Oct 27 '19 at 16:30

TeXstudio does not save any temporary copies of your file.

There is an option Advanced Editor -> Special Options -> Auto Save All Files. When activated, this callsFile -> Save All` in regular intervals. However, this function is deactivated by default, because it saves and thus overwrites your original file. Since a user should be aware of this behavior and its consequences, it is not activated by default.

  • RStudio's solution to this is to store temporary copies of each file in a hidden folder in the same location as the main file and save every five seconds, if that helps. – kennyB Apr 21 '15 at 0:56
  • 2
    The user should also be aware that TeXstudio does NOT auto-save by default and its consequences. – Justas May 2 '15 at 20:42
  • 1
    Referring to the "Error Tolerance" usability guideline of: wqusability.com/articles/5es-upa2003.pdf – Justas May 2 '15 at 21:04
  • This is idiotic and short-sighted. Ideally, it should save under a name such as actual-file-name-<time-stamp>.tex . It's like people have stopped thinking ... – Sebi Sep 21 '20 at 8:59
  • -1 just for the sake of a much more useful answer below – Rafael Oct 20 '20 at 0:26

I had the same problem. If you have build or compiled the file you can be lucky and find the document in your %userprofile%\AppData\Local\Temp folder.

You can find this folder in windows by typing %temp% in the Run command Window. Windows+R -> type '%temp%' -> your file should be here

  • 2
    Where can find this file in Linux operating systems? – Freeman Jul 5 '18 at 13:37
  • 1
    oh, I have just found out my tex file by this way. Thanks a lot! – Black Mild Jun 24 '19 at 18:11
  • 1
    Thank you! Life saver over here – Nathaniel Mayer Nov 17 '19 at 22:46
  • You just saved me a whole day worth of work. Thank you! – Rafael Oct 20 '20 at 0:27

Tim's advice is correct. In 5 easy steps:

  1. Select Options menu
  2. Select Configure TexStudio submenu
  3. Near the lower left corner (not very visible) check the "Advanced options" checkbox
  4. Now you see the "Advanced Editor" submenu: select it
  5. In the "Special Options" paragraph "Save automatically all files": select the time interval you like

That's it!


I also recommend storing your Tex files on Github in case your computer completely crashes and doesn't want to start back up again (saved me few hours of work).

  • 1
    Well, at last github is public, I'm not sure it is a very good place to store a backup. Better us CD-ROMs, usb sticks, mobile harddisk drive, ... – Mensch Dec 4 '18 at 3:19
  • Sure, but this requires more effort than typing 2 commands on bash – user21398 Dec 4 '18 at 18:29
  • Another option is to store files in a automatic synchronized service, such as Dropbox or OneDrive, assuming you don't want to type commands to save neither store it public. – FHZ Feb 3 '20 at 12:11

For others looking for this option on a Mac, the location of the autosave option is a bit different. Here is where you will find it:

  1. In the menu bar, click on "TeXstudio" -> "Preferences".
  2. Click on the box label "show advanced options" located in the bottom-left corner of the preferences window.
  3. Select the check box labeled "Adv. Editor" in the panel on the left side of the preferences window.
  4. In the "special options" section of the preferences window, find the drop down menu labeled "Auto Save All Files:". The default value is "Never".
  5. Select the desired save frequency from the drop down menu (1, 2, 5, 10, 20, or 60 minutes between saves).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.