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
    Commented Jul 5, 2014 at 5:38
  • I don't think it can be recovered.
    – hola
    Commented Jul 5, 2014 at 7:18
  • 1
    If you built it, it should be saved somewhere. That file might be corrupted though.
    – Juri Robl
    Commented Jul 5, 2014 at 8:45
  • An issue requesting this feature is open on the project's github page: github.com/texstudio-org/texstudio/issues/644 Commented Oct 27, 2019 at 16:30

6 Answers 6


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
    Commented Apr 21, 2015 at 0:56
  • 3
    The user should also be aware that TeXstudio does NOT auto-save by default and its consequences.
    – Justas
    Commented May 2, 2015 at 20:42
  • 1
    Referring to the "Error Tolerance" usability guideline of: wqusability.com/articles/5es-upa2003.pdf
    – Justas
    Commented May 2, 2015 at 21:04
  • 2
    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
    Commented Sep 21, 2020 at 8:59
  • -1 just for the sake of a much more useful answer below
    – Rafael
    Commented Oct 20, 2020 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

  • 3
    Where can find this file in Linux operating systems?
    – Freeman
    Commented Jul 5, 2018 at 13:37
  • 1
    oh, I have just found out my tex file by this way. Thanks a lot!
    – Black Mild
    Commented Jun 24, 2019 at 18:11
  • 1
    Thank you! Life saver over here
    – nkm
    Commented Nov 17, 2019 at 22:46
  • You just saved me a whole day worth of work. Thank you!
    – Rafael
    Commented Oct 20, 2020 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!


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

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
    Commented Dec 4, 2018 at 3:19
  • Sure, but this requires more effort than typing 2 commands on bash
    – user21398
    Commented Dec 4, 2018 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
    Commented Feb 3, 2020 at 12:11

you can use a searching tool named Everything. Open this software, searching ".tex" and find the latest file, which is the file you want.

  • Welcome to TeX.SE!
    – Mensch
    Commented Oct 14, 2021 at 12:51
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Oct 14, 2021 at 12:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .