this post was submitted on 27 Nov 2023
2 points (100.0% liked)

Data Hoarder

221 readers
1 users here now

We are digital librarians. Among us are represented the various reasons to keep data -- legal requirements, competitive requirements, uncertainty of permanence of cloud services, distaste for transmitting your data externally (e.g. government or corporate espionage), cultural and familial archivists, internet collapse preppers, and people who do it themselves so they're sure it's done right. Everyone has their reasons for curating the data they have decided to keep (either forever or For A Damn Long Time (tm) ). Along the way we have sought out like-minded individuals to exchange strategies, war stories, and cautionary tales of failures.

founded 2 years ago
MODERATORS
 

Hi. I'm beginning the process of moving old content from Google Drive to an external drive (that I mirror to another external drive). Here are my planned steps:

  1. Sync the folder to my local hard drive using Google Drive for desktop.
  2. Copy the whole folder to my primary external drive.
  3. Sync to my backup external drive (I'm using Free File Sync).
  4. Delete the folder from Google Drive.

The issue I just realized is the Google Drive folders have Google Docs files within them, and not in a single place. This prevents me from deleting the whole folder in Google Drive without losing those files. Is there any method to delete the quota-affecting files within a subfolder in Google Drive while leaving the Google Docs files in place?

I'm using Windows but also have a Mac available, in case that helps with step 4.

Thanks.

top 4 comments
sorted by: hot top controversial new old
[–] dr100@alien.top 1 points 2 years ago (1 children)

As usual the answer is of course rclone. It even has --drive-skip-gdocs switch. Just rclone move --drive-skip-gdocs gdrive_remote:whatever_directory_if_any_at_all some_local_place

[–] football236@alien.top 1 points 2 years ago

Thanks. rclone never ceases to amaze. I searched quite a bit before posting, but nothing about rclone having this functionality came up. Much appreciated.

[–] JKaique2501@alien.top 1 points 2 years ago (1 children)

2 years ago I managed to do step 1, then I did step 2 using a custom python script to skip the specific google docs file extensions, them I proceeded to step 4.

You may use shutil (library) to copy and delete (or cut) the files that are not from google docs, then delete the directory if it is now empty. That should leave only the directories with the google docs files

[–] football236@alien.top 1 points 2 years ago

Good suggestion. This also got me thinking, and I started writing a script in Google Apps Script. Thanks.