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:
Steps to the solution:
https://filext.com/ and drag and drop the backup file into the location referred to.
Go to the top of the website to download the dragged file as LYX file and save it to your computer.
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.
Click on the file name to change
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.
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.