Back office

How do we sort out a messy Google Drive full of duplicate files?

By Paul Meakin9 min read

MacBook Pro displayed on a minimalist office desk with shelves in the background
Photo: Nao Triponez on Pexels

How did the Drive get like this?

Nobody decided it should. Someone made a folder for a project, then a copy of the folder for the next one. A proposal went out as a link because attaching it felt old fashioned. A colleague downloaded a file, changed it, uploaded it again and called it Final. Then Final v2, then Final v3 REAL final, because the first two turned out not to be.

Years later the Drive holds three versions of the price list, two of them wrong, and nobody is sure which one the sales team sends. Contracts sit in the My Drive of someone who left in the spring. And there are links to files that anyone can open, sent to people whose names nobody remembers.

None of that is carelessness. Drive makes sharing and copying easy, and nobody wrote down a rule for when to do either.

It means anyone who has the link. Google's help page on sharing files sets out the general access options for a file:

General access Who can open it When it fits
Restricted Only people with access can open the file The default for anything internal
Anyone with the link Anyone who has the link, without signing in to a Google Account A brochure or a public form, never a contract
Public Anyone can search on Google and get access to your file Almost never, for a business file

The middle row is the one that causes trouble. A link gets pasted into an email, the email gets forwarded, and the file is now open to people you never chose. The same page says that when you share a link to a file, your name and email will be visible as the owner of that file.

Folders make it bigger. Google's guide says access that you apply to a folder is inherited by all files within it. Share the folder once and every file that lands in it later is shared too, whether anyone meant it or not.

How do you find what has been shared outside the business?

Start with search. Google's guide to searching Drive lists an operator for this: typing sharedwith:external in the search bar is described as finding items explicitly shared with users or groups outside your Google Workspace organisation. Run it from each Google Workspace account that owns files and you get a list to work through.

It has a limit worth knowing. It looks for files shared with named people or groups. A file opened up to anyone with the link has not been shared with anyone by name, so treat those as a separate check.

Then close what should not be open. Google's page on stopping sharing explains that changing a file's general access to Restricted means only people with access can open it, and that this overrides inherited parent folder permissions. You can also remove named people one at a time. On a work or school account you can give someone access for a limited time instead, choosing an expiry date within one year of the current date.

One catch on deleting. The same page says that if you delete a shared file you own, people who could view, comment or edit can make a copy of the file until you permanently delete it. It also says plainly that you can't stop how others share the file content in other ways. Closing a link stops new visits. It does not recall copies already made.

Why do files go missing when someone leaves?

Because they were never the company's files in the first place. In My Drive, each file belongs to the person who created it. Google's page on shared drives puts the difference simply: shared drive files belong to the team instead of an individual. When someone leaves and an admin deletes their account, files they added or created in shared drives remain.

Question My Drive Shared drive
Who owns the files? The person who created them The organisation
What happens when they leave? The files are tied to their account The files stay in the shared drive
Who sees what? Whatever each person shared, file by file All members see the same content
Deleted by mistake? Restored by the file's owner Restored by anyone with at least Contributor access

Shared drives are not in every plan. The same page notes that people whose Google Workspace edition doesn't include shared drives can only be added with Viewer access, so check yours before planning around them.

How do you stop the Final v3 copies?

Stop making copies to save a version. Google files already keep their history. Google's guide to version history shows how to see what changed in a document, who changed it, and how to restore an earlier version. You can also create a named version to track your version history and make sure that your versions aren't merged. Name the version that went to the client, rather than saving a new file with a new name.

Uploaded files, such as PDFs and Word documents, work differently. Google's page on file versions shows how to upload a new version over the old file instead of adding another one beside it. Older versions do not last for ever, though: a version might be permanently deleted after 30 days or if there are 100 newer versions, unless you choose Keep forever.

For the same file needed in two places, use a shortcut rather than a copy. Google's page on shortcuts says shortcuts point back to the original file so you always have the latest info. It also warns that the original file's permissions aren't automatically updated when you create a shortcut, so a shortcut in a team folder does not give the team access by itself.

Where do people get this wrong?

The big tidy weekend. Someone spends two days renaming and moving everything. Within a month it looks the same, because the habits that made the mess are untouched.

The perfect folder structure. Seven levels deep, designed by one person, followed by nobody else. People save where they can find things again, not where a diagram says they should. A structure with a handful of top level folders, named after how the business actually works, beats a clever one.

Deleting as the fix for oversharing. As above, deleting a shared file does not stop copies already made, and anyone with edit access can share a file onwards unless the owner turns that off.

And buying more storage. It makes the warning go away. It does not make anything easier to find.

Can the tidying run on its own?

Partly, and the part that matters most is the check on links. Google Apps Script can run a job on a schedule: Google's guide to installable triggers describes time driven triggers that run as frequently as every minute or as infrequently as once per month.

That job can ask Drive for the files that are open to anyone. The Drive API search guide lists a query for exactly that: visibility = 'anyoneWithLink'. A weekly script can run that query, write the results to a sheet and email the owner of each file to confirm it should still be open. Each person checks a short list rather than the whole business auditing everything once a year and finding it all at once.

Two things to set up properly. Google says installable triggers always run under the account of the person who created them, so build the job on an account the business controls. And a script only sees the files its account can see, so decide which account runs it before deciding what it checks. We build this kind of job in our Google Apps Script service.

We would not let a script change sharing settings on its own. Reporting is safe. Closing a link a client relies on, without asking, is how a tidy Drive becomes an angry phone call.

Does data protection law come into it?

Yes, if old files hold personal data, and CVs, staff records and customer spreadsheets usually do. The ICO's guidance on storage limitation is direct: you must not keep personal data for longer than you need it. It says you should also periodically review the data you hold, and erase or anonymise it when you no longer need it.

A Drive full of forgotten copies makes that hard, because you cannot review what you cannot find. The ICO notes that this guidance is under review following the Data (Use and Access) Act, so check the current version before relying on it.

When is this not the answer?

When you are a handful of people with one shared folder that works. Leave it alone and spend the time elsewhere.

When the real problem is records you are legally required to keep, such as accounts or regulated client files. How long those stay, and in what form, is a question for your accountant, your professional body or a data protection adviser, not a folder tidy.

When you suspect a link has already exposed something it should not have. That is no longer housekeeping. Close it, write down what happened, and take proper advice on whether it needs reporting.

And when nobody will own the structure afterwards. A tidy Drive with no owner drifts back within months.

Where do you start?

Give it an hour. Run sharedwith:external from the accounts that own most of your files, then check for files open to anyone with the link, which that search does not catch. List anything important that lives in one person's My Drive. Pick the three files people argue about the most and give each one a single home.

If that hour turns up more than you expected, tell us what's stuck and we'll map the quickest fix. We will tell you straight whether it needs a shared drive and a naming rule, a short script that watches the links, or nothing more than an afternoon. Time to talk yet?

Common questions

Can I see every file in the business that is shared with anyone who has the link?

Not from one search box. Each person can search their own Drive, and a script can query Drive for files open to anyone with the link, but it only sees what its own account can see. Decide which account runs the check first.

If I change a link to Restricted, can people who already have the file still open it?

Only if they have been given access by name. Google says Restricted means only people with access can open the file. Anyone who downloaded or copied it earlier still has that copy.

Should we delete the old duplicates?

Once you know which copy is the real one, yes, after checking nobody links to the others. If any of them hold personal data you no longer need, the ICO expects you to review it and erase or anonymise it.

Do we need Google Workspace for shared drives?

Yes, and not every edition includes them. Google's page says people whose Workspace edition does not include shared drives can only be added with Viewer access, so check your plan first.

Sources

  1. Share files from Google Drive, Google Drive Help
  2. Stop, limit or change sharing, Google Drive Help
  3. Search for files in Google Drive, Google Drive Help
  4. What are shared drives?, Google Workspace Learning Center
  5. Find out what's changed in a file, Google Docs Editors Help
  6. Check activity and file versions, Google Drive Help
  7. Find files and folders with Google Drive shortcuts, Google Drive Help
  8. Installable triggers, Apps Script, Google for Developers
  9. Search for files and folders, Google Drive API, Google for Developers
  10. Principle (e): Storage limitation, ICO

Paul Meakin, Founder

Twenty years of fixing businesses from the inside, eighteen of them in recruitment from consultant to national operations, before building the automation, web applications and compliance systems Staxxd runs today.

More about Paul

Time to talk yet?

Tell us what's stuck and we'll map the quickest fix. Fifteen minutes, no obligation.

Time to talk yet?