how to recover deleted files from google docs

Recover Deleted Files from Google Docs

By Ashley Jones
AD

So, you've accidentally deleted a file from Google Docs? No need to panic – Google keeps a version history of your documents that you can use to recover deleted content. This guide will walk you through the process, step by step.

Before we dive in, ensure you're logged into the Google account where your deleted file was stored. Also, this method works for text changes made by you or anyone you've shared the file with and within the last 30 days. Let's begin.

Using Version History to Recover Deleted Files

Google Docs automatically saves and backs up your work at regular intervals. This feature, called Version History, is your lifesaver in such situations.

AD
How To Recover Deleted Files from Google Drive
How To Recover Deleted Files from Google Drive
How to Delete Files from Google Drive on Mobile and PC - Make Tech Easier
How to Delete Files from Google Drive on Mobile and PC - Make Tech Easier
How to Access Google Docs Trash
How to Access Google Docs Trash

To access this feature, you'll need to know how to find your document's version history. Here's how:

Accessing Version History

First, open Google Drive and find the Doc from which the file was accidentally deleted.

How to Recover Unsaved or Deleted Google Docs Files
How to Recover Unsaved or Deleted Google Docs Files
How to Automatically Delete Your Google Data, and Why You Should — Lifehacker
How to Automatically Delete Your Google Data, and Why You Should — Lifehacker

1. Right-click on the Google Docs file. 2. Select 'Get link' from the menu. 3. At the bottom right of the 'Get link' box, click 'More'. 4. Select 'Version history'.

Restoring a Previous Version of the Document

Once you're in the Version history view, you can see all the saved versions of your document. Here's how to restore a previous version:

AD

1. In the right panel, find the version you want to restore to. 2. Click the three vertical dots next to the version you want. 3. Select 'Restore this version'.

That's all! Your file will be restored to that previous version, and the deleted content will be back. Keep in mind that this will replace the current version of the file, so make sure the version you're restoring is the one you need.

Manually Searching for Deleted Text

If you're looking for a specific text that you deleted, you can manually search for it even after it's gone. This method is a bit more complex but could be useful if all you need is to recover specific text.

AD

The process involves using a script and Google Drive API. Don't worry, it's not as technical as it sounds. We'll walk you through it step-by-step.

Creating a Google Apps Script

Here's how to create a script to search for deleted text:

1. Go to Google Drive, right-click on your Google Docs file, and select 'Open with' > 'Google Apps Script'.

AD

Writing the Script

In the 'googleappsscript.com' window, delete any existing code and paste the following JavaScript:

The script uses the Document service's getBody().replaceText('searchString', 'replacementString') method to find and replace text in a Google Document. Remember to replace 'searchString' with the text you're searching for.

Just like that, you've learned how to recover deleted files and text using Google Docs' Version History and a quick script. It's always a good idea to have multiple copies of your important work, both for safety and convenience. Next time, consider using Google Docs' collaborative features to work with others without worrying about overwriting each other's changes. Happy document management!

AD