Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Feature: Detecting Orphaned Files #458

Open
mbenlioglu opened this issue May 2, 2019 · 0 comments
Open

Feature: Detecting Orphaned Files #458

mbenlioglu opened this issue May 2, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@mbenlioglu
Copy link
Contributor

mbenlioglu commented May 2, 2019

Overview

    In Google Drive, if a file or a folder does not have any parents (including the root a.k.a. "My Drive") it becomes orphaned, and cannot be seen in the web GUI. It's also mentioned in this Google support article I'm also quoting related part here:

If you create a file in Drive that you later can’t find, the file might have lost all of its parent folders. It becomes an orphaned file. The file still exists but is harder to find.

How files lose their folder

Here's how a file can become orphaned:

  • You create a file in someone else's folder. Then they delete the folder. Your file isn't deleted because only you can do that. But it’s no longer in a folder.
  • Or, you share a folder with someone who removes your file from the folder. Again, the file isn't deleted, but it's no longer in a folder.

Find your orphaned files

  1. In the Drive search field, type: is:unorganized owner:me.
  2. When you find the file, move it to a folder in My Drive so it’s easier to find next time.

Problem

    Although it is possible from web GUI to search such files with is:unorganized owner:me we cannot do that from the API. Google internally uses unparented = true to correspond is:unorganized but didn't make it available for public API.

    In order to find such files, an efficient mechanism needed to index all files and find the ones that has their parents field empty. And move them under a new folder e.g. lost+found

@mbenlioglu mbenlioglu added the enhancement New feature or request label May 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant