0

I use LYX and my file just disappeared when working. The file name remains but has no content. Luckily, I have the LYX backup file with File Type ~. This file has content but it is in ASCI format.

How can I open this backup file in LYX? Please help.

0
2

LyX files are just plain text files but with the extension .lyx. Backup LyX files are exactly the same, but with the extension .lyx~. You only have to rename a copy of that file to have the extension .lyx. E.g.: mywork.lyx~ to myhope.lyx.

Note that filename extensions are by default hidden in Windows. Therefore, be sure that you rename really the file to myhope.lyx (you will see only myhope in the file manager) and not to myhope.lyx.lyx~. (The better to avoid confusions is unchecking this "funny" feature in the file manager options).

4
  • I tried your suggestion but still the file name looks like filename.lyx.lyx~ simply I cannot get rid of this ~. Can you tell me how to go to file manager? Jul 13 at 10:50
  • I do not know exactly (sorry, I switch to Linux in times of W95 in past century and barely I touched XP or never versions since then) but seems that here you have a good guide for W10. Alternatively, I guess that the command prompt still exist and you can make a copy easily form here using copy .
    – Fran
    Jul 13 at 11:29
  • Thank you so much for your help. I found the solution and now I will post it as an answer with the hope that the answer will help those facing the same problem. Thanks again. Jul 13 at 12:03
  • Just a note (feel free to edit in or not): as of LyX 2.4.0 (release date unknown), you can open backup files from the File > Open dialog. The relevant code change is lyx.org/trac/changeset/c6c65765/lyxgit.
    – scottkosty
    Jul 14 at 18:34
0

Here is the answer to solving the problem of converting a LYX backup file with ~ to a normal LYX text file.

The problem I had is:

I lost the latest version of my LYX file due to a crash (unknown reason) and the original file had zero content (0 KB), but luckily I had the LYX backup file with an extension ~ (with 45 KB, for example). The difficulty for me was to remove the ~ from the file name to get my original file. I could not remove the ~ for some reason.

But then, I found the following site:

https://filext.com/

Steps to the solution:

  1. Go to https://filext.com/ and drag and drop the backup file into the location referred to.

  2. Go to the top of the website to download the dragged file as LYX file and save it to your computer.

  3. Look at the file name of the saved backup file. You will see xxxxx.lyx.lyx~ for the file you just saved in your computer.

  4. Click on the file name to change xxxxx.lyx.lyx.~ to xxxxx.lyx

  5. When you change the file name, you will automatically see that LYX icon is shown, indicating that the backup file has been converted to a normal text file.

  6. Open the file xxxxx.lyx with LYX. You must now get your latest version.

I hope nobody will have to come to this page to read my answer because it is a terrible feeling when you lose your precious document.

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.