GeneralHow to open Lyx backup file

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
tt_2021
Posts: 3
Joined: Tue Jul 13, 2021 3:33 am

How to open Lyx backup file

Post by tt_2021 »

I am trying to recover my Lyx document that crushed and became 'not readable'. I found a solution from the past answer (see below), but I don't know how to remove the tilde from ***.lyx~ file. I cannot just rename it because it isn't a file name but a file type. I cannot also change the file type from 'lyx~' to 'lyx' because I can open the file only with notepad which gives no option of 'save as' Lyx document.

How can I open the ***.lyx~ file to recover the ***.lyx document?

Quote from the past answer:
Take a look if you can see a .lyx~ file, that is, with a tilde at the extension. This would be a backup file created by LyX that you could use. First of all, copy all the documents in the folder, such as on a flash drive, before you try anything. Try opening the .lyx~ file or remove the tilde and then open with LyX.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

How to open Lyx backup file

Post by Ijon Tichy »

Sounds like the question of a Windows user, isn't it?

How to Change File Type in Windows 10

Alternatively you can use TeXworks to open the file and use Save as to save it with another extension. To do so, you have to deseclect the automatic extension setting in the Save as dialog. TeXworks is part of MiKTeX and TeX Live.

BTW: Don't forget to make a copy before you rename the file! If something fails, you could be without backup otherwise.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
tt_2021
Posts: 3
Joined: Tue Jul 13, 2021 3:33 am

How to open Lyx backup file

Post by tt_2021 »

Thank you for your reply. I could not open the backup file with TeXworks, so I tried an online program.

I opened the ***.lyx~ file with FILExt, an online Lyx Text Viewer (https://filext.com).

After opening the ***.lyx~ file online, I clicked 'save as Lyx' to download the file to my pc. The downloaded file had a name with extension, so I could changed the name (extension) to ***.lyx

The backup file became Lyx document, which is the last version I was working on. Thankfully, I have recovered crushed Lyx document from the backup file.

I hope this information would be useful for somebody facing the same problem.
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

How to open Lyx backup file

Post by Ijon Tichy »

The page, I've linked in my answer, does explain, how to use the Windows Explorer to rename the file. So no online service is needed.

BTW: I can even use LyX to open the backup file. Just do FileOpen …, edit the filter field to change LyX Documents into *.* and then select the backup file. Open with … from the Windows Explorer context menu (right click to the file) may also work.

Using an external online service is always a trusting problem and in several scenarios not allowed. So I would always try a local, build in solution. Just my two Cent.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
tt_2021
Posts: 3
Joined: Tue Jul 13, 2021 3:33 am

How to open Lyx backup file

Post by tt_2021 »

Thank you again for your help.
Post Reply