If you are lucky, you might be able to find some of the temporary files which Writer wrote while you were editing the file, and which may still be there. Writer deletes them when it closes, so if you cannot find them, you will need to try to un-delete them. Act quickly - they risk being overwritten the longer you leave it..
The following is based on Windows 7 but other versions of Windows should be very similar.
Mac and Linux
If you are running Mac or Linux, it should still be very similar. All you need to do is to check which paths Writer uses by Tools > Options (Preferences for Mac??) > OpenOffice > Paths .... If you are in doubt, open a .odt file (or create a new one or edit a .doc file - whatever it was you were doing when you lost the document) and check to see where the temporary files go and what they are called. Then search in that folder or folders for deleted temporary files for your lost document where the deleted files will have similarly formed names to those you found when doing the check. You will a need Mac or Linux unzip utility and a Mac or Linux un-delete utility.
Note for those with Solid State Disks (SSD)
If you are using a Solid State Disk, the Operating System will silently work in the background to delete all the data from deleted files and reset all the file bits to zero so you may not find that many temporary files. The OS does this because the OS must set all bits to zero before writing to an SSD. Setting the bits to zero in the background therefore speeds future writes.
Before you begin you must switch on being able to see hidden files. So
1 Go Start > Control Panel > Folder Options > View...
2 tick Show Hidden files, folders and drives
If you have not done this you will not be able to see the temporary files folder or the temporary files inside it.
Did you have AutoRecovery set to ON?
Check by Tools > Options > Load/Save > General. If you had AutoRecovery ON, then Writer should automatically find the AutoRecovery files and recover your file. If Writer does not recover your file, follow the instructions below and check to see if the AutoRecovery files are still there. If none are there then look for deleted versions.
Did you have Create a backup copy ..., set to ON?
Check by Tools > Options > Load/Save > General. If you had Create a backup copy ... set to ON, look in the Backup folder for a file called fred.bak, where your file is fred.odt. Open fred.bak with Writer (or rename it to fred.odt).
If you did not have AutoRecovery or Backup set to ON you have to look for deleted temporary files.
The method you use depends on what type of file you were editing, namely:
1 whether it was an existing .odt file saved on your PC (or .docx file);
2 a file which you had never previously saved; or
3 a .doc file.
From what I can gather, Writer handles .docx files in the same way as .odt files so if you are recovering a .docx file, follow the instructions given for .odt files.
1. Recovering .ODT files which have previously been saved - also works for .docx files
In this case, you were editing a .odt file like fred.odt (or fred.docx). You are looking for files with names something like C:\Users\xxxxxx\AppData\Local\Temp\sv2ju1mk.tmp\sv2ju21c.tmp. Note that it is very unusual for a
folder to be called C:\Users\xxxxxx\AppData\Local\Temp\
sv2ju1mk.tmp\, with a " . " in the folder name, but this is what Writer does. You will therefore be looking for files called something like C:\Users\xxxxxx\AppData\Local\\Temp\sv2ju1mk.tmp\sv2ju21c.tmp where xxxxxx is your username.
If you manage to find and undelete a file like sv2ju21c.tmp, unzip it and check if it is a .odt (or .docx) file (some files with names like sv2ju21c.tmp will be graphics files). If sv2ju21c.tmp is a .odt (.docx) file, rename it to sv2ju21c.odt (sv2ju21c.docx) and open it. You should get back the complete fred.odt (fred.docx)file as it was the previous time it was saved.
You also get back all the images, both those already in the document when you opened it
and all the images added since. You
do not get the
text added since the file was last saved.
If you had AutoRecovery set to ON then also see
2. Getting back AutoRecovery files when AutoRecovery has been set to ON as you may also be able to recover some of the AutoRecovery files as well or instead.
2. Getting back AutoRecovery files when AutoRecovery has been set to ON
The following methods only work if you had AutoRecovery set to ON. Note: you set AutoRecovery to ON by Tools > Options > Load/Save > General ... The Backup folder location is specified in Tools > Options > OpenOffice > Paths ..., and the default is C:\Users\xxxxxx\AppData\Roaming\OpenOffice\4\user\backup\.
2a. Recovering the AutoRecovery file for an existing fred.ODT which was being edited - it should also work for .docx files
If you were editing fred.odt, then Writer creates an AutoRecovery file called
fred.odt_0.odt in the Backup folder. The default backup folder is C:\Users\xxxxxx\AppData\Roaming\OpenOffice\4\user\backup so you are looking for files named C:\Users\xxxxxx\AppData\Roaming\OpenOffice\4\user\backup\fred.odt_0.odt where " 0 " is a zero.
First, navigate to the Backup folder and look for existing files like
fred.odt_0.odt.
Second, if there are no fred.odt_0.odt files in the Backup folder, then use Recuva and try to find a deleted version of fred.odt_0.odt. If you do manage to find it, fred.odt_0.odt will have the entire contents of the document as saved at the AutoRecovery time it was created.
2b. Recovering the AutoRecovery file for a new document which has never been saved
If you are editing a new file and you have never saved it, Writer gives the file the name
Untitled1.odt while you are editing it but does not save it. When Writer creates an AutoRecovery file, Writer creates a file called
untitled_0.odt in the Backup folder as C:\Users\xxxxxx\AppData\Roaming\OpenOffice\4\user\backup\untitled_0.odt where " 0 " is a zero.
First, navigate to the Backup folder and look for
untitled_0.odt.
Second, if it is not there, then use Recuva and try to find a deleted version of the file. If you do manage to find it, it will have the entire contents of the document as saved at the AutoRecovery time it was created.
2c. .doc files. Recovering the AutoRecovery file for an existing fred.DOC which was being edited
When you edit
fred.doc, and you have AutoRecovery set to ON, Writer creates a temporary AutoRecovery file for it in the Backup folder called
fred.doc_1.odt whenAutoRecovery saves. The file will be names C:\Users\xxxxxx\AppData\Roaming\OpenOffice\4\user\backup\
fred.doc_1.odt. Writer deletes this AutoRecovery file when you save the .doc file and/or close Writer.
First, navigate to C:\Users\xxxxxx\AppData\Roaming\OpenOffice\4\user\backup\ and look for
fred.doc_1.odt, where
fred is the name of the file you were editing. If your PC or Writer crashed, you may be lucky and still find
fred.doc_1.odt there.
Second, if you do not see it, then use Recuva and look for deleted versions of it.
There are some more detailed explanations in the following posts which may be useful:
Using RECUVA to un-delete Writer .odt temporary files which are now deleted
Another on RECUVA
These may also be helpful.
Using 7-ZIP
Inside an odt file
Hints on how to prevent it happening
Some hints ...
Always set
AutoRecovery to ON - this saves a copy of the file every few minutes while you are working on it - it protects you against things like power cuts, OS freezes etc. Do so by Tools > Options > Load/Save > General ...
Always ?? set
Create A Backup copy to ON - this keeps the previously saved version of the file fred.odt as fred.bak in the Backup folder. Do so by: Tools > Options > Load/Save > General ... The Backup folder location is shown by Tools > Options > OpenOffice > Paths ... You may need to switch on Show hidden files (Control Panel > Folder Options > View ...) to be able to see the folder and its contents.
Why the ?? ? Because you should remember that highly_personal.bak will still be in the Backup folder long after you have deleted highly_personal.odt.
... and, of course,
always take a daily backup of all important files and store them somewhere safe. A cheap USB memory stick is infinitely better than nothing. In an emergency, or if you need a very quick backup, just email yourself a copy of the file!
Remember, it is not a case of "
if my disk fails ..." or "
if I lose my file". It is a case of what do I do "
when my disk fails ..." and "
when I lose my file ...". You can download free backup utilities which will back up your hard drive daily so that you will never lose more than 24 hours work - I have used Cobian from
http://www.cobiansoft.com/index.htm for many years and have never lost a file despite having disk crashes and lightning which destroyed both my PC and hard drive.
Edit: Extensively edited to add information and make clarifications |
[/strike]