Overwrote a file but original text is in cache somewhere

Discuss the word processor
Locked
Krenzathal
Posts: 2
Joined: Mon Sep 16, 2019 4:08 pm

Overwrote a file but original text is in cache somewhere

Post by Krenzathal »

Hi folks,

I'm livid right now so please let me explain what is wrong:

I accidentally pushed CTRL + S and overwrote another document. OpenOffice didn't even ask me if I was sure, but to add insult to injury, unlike any of my other applications there was absolutely no auto backup file of any kind made or any previous versions saved.

However, here's the thing: when I search for this file in Windows explorer it comes up, but the little preview is the original document! The text must be saved in some cache somewhere so if I can just access that I can copy the words over, but I have no idea how to. When I open the document in OO it's just the overwritten file that loads, but that Windows Explorer preview has the original text, and I MUST get it back at all costs.

I'm not touching anything in case that cache gets overwritten, so if anyone can quickly advise me on this I'd be most grateful.
Openoffice 4 on Windows 7
Bill
Volunteer
Posts: 8952
Joined: Sat Nov 24, 2007 6:48 am

Re: Overwrote a file but original text is in cache somewhere

Post by Bill »

If the "little preview" is the thumbnail icon, that's probably coming from the Windows thumbnail cache which does not contain the actual document.

Did you right-click the document file in Windows Explorer and select "Previous Versions"? Previous versions are saved by Windows, not individual applications. AOO does have an auto backup option which stores the penultimate version, but that option must be enabled by the user.
AOO 4.1.14 on Ubuntu MATE 22.04
Krenzathal
Posts: 2
Joined: Mon Sep 16, 2019 4:08 pm

Re: Overwrote a file but original text is in cache somewhere

Post by Krenzathal »

Thanks for the reply bill.

Yes it's the thumbnail but it also partially shows text from the content of the file, and that content is from the original document. I've searched for any previous version but I can't find any, so why is it showing the text from the overwritten document in that preview if there is not a copy anywhere?
Openoffice 4 on Windows 7
User avatar
RoryOF
Moderator
Posts: 35248
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Overwrote a file but original text is in cache somewhere

Post by RoryOF »

Ctrl S will entirely have overwritten any previous version of that file. Presumably you took an existing file, edited to suit your requirement, then, without changing its name, Saved it under the original file name. There will only be your new content.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Overwrote a file but original text is in cache somewhere

Post by RusselB »

The thumbnail is a small picture of the document, so the text will appear in the picture.
This information is stored in a hidden Windows folder...sorry, I don't recall which one in order to help you locate it.
Usually the pictures are too small for usage as you are wanting to do, even if you printed the picture and then scanned it into Writer.

Don't search for the old file using Windows Explorer, instead locate the new file that was saved using the same name, then follow Bill's instructions regarding Previous Versions on that file.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
MrProgrammer
Moderator
Posts: 5453
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Overwrote a file but original text is in cache somewhere

Post by MrProgrammer »

Hi, and welcome to the forum.
Krenzathal wrote:OpenOffice didn't even ask me if I was sure …
This follows normal operation for most applications. They don't ask for confirmation of a Save operation. They do typically ask if you use Save As to overwrite an existing file. But you didn't use Save As, you used Save (Ctrl+S on Windows).
Krenzathal wrote:… unlike any of my other applications there was absolutely no auto backup file of any kind made or any previous versions saved.
No. If you enabled option OpenOffice → Preferences → Load/Save → General → Always create backup copy, OpenOffice saved the previous content in its backup directory. Options are set with OpenOffice → Preferences on a Mac, Tools → Options on other platforms. If you don't know where the backup directory is, view option OpenOffice → Paths. You would preserve the backup copy using your operating system, not OpenOffice:
• Backup directory\MyOverwrittenFile.bak ➜ MyDocuments\MyNewFile.odt
Krenzathal wrote:When I open the document in OO it's just the overwritten file that loads …
Bad move. If you use OpenOffice to close MyOverwrittenFile.odt and reopen it before preserving the BAK file, you will lose your backup copy.
Krenzathal wrote:I'm not touching anything in case that cache gets overwritten.
The preview you see is probably a tiny picture of a single document page, so even if you could find the preview it is useless for recovering your text. However, if you have not closed the document in OpenOffice there is a "cache" of sorts. You can use Edit → Undo to revert each change up to your Undo limit (option OpenOffice → Memory). You can undo changes across a Save operation. Perhaps this will get you closer to your original content and then you can use File → Save As to create a new file.
Krenzathal wrote:I accidentally pushed CTRL + S and overwrote another document.
I have learned that if one intends to create a new document based on an existing one which should be preserved it is best to use File → Save As immediately after opening the existing document, before making the first change. This prevents the panic you're experiencing. Another method is to use File → Open → Options → Read only since you won't be able to make any changes to the document until you create a new file with Save As.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
RoryOF
Moderator
Posts: 35248
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Overwrote a file but original text is in cache somewhere

Post by RoryOF »

MrProgrammer wrote:
Krenzathal wrote:I accidentally pushed CTRL + S and overwrote another document.
I have learned that if one intends to create a new document based on an existing one which should be preserved it is best to use File → Save As immediately after opening the existing document, before making the first change. This prevents the panic you're experiencing.
I agree - one should immediately name a file (/File /Save as). Also, to avoid such situations, is why Templates are used.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
John_Ha
Volunteer
Posts: 9605
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Overwrote a file but original text is in cache somewhere

Post by John_Ha »

Krenzathal wrote:I'm livid right now ... there was absolutely no auto backup file of any kind made or any previous versions saved.
That's your fault. If you had read the manual or checked the options you would have seen how to enable it. A bad workman always blames his tools.

The icon picture is created with the file contents at the time the icon is created. If you later edit the file contents the icon image does not change.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Locked