This repository contains a script to batch delete all files and folders from a Google Drive folder that match a specific pattern using Google Colab and PyDrive2. This allows you to manage your Google Drive files directly in your browser.
- No Coding Skills Required: You don't need to know any programming or coding to use this script.
- Browser-Based Solution: All steps are performed online in your web browser using Google Colab.
- Simple and Easy Setup: Follow the step-by-step instructions to quickly set up and run the script.
- Automated Process: The script automates the deletion process, saving you time and effort.
- User-Friendly Instructions: Detailed, user-friendly instructions make it easy for anyone to follow.
- A Google account with access to Google Drive.
- Root Folder ID:
- Open the folder in Google Drive.
- The URL will look something like this:
https://drive.google.com/drive/folders/ROOT_FOLDER_ID
. - Copy the
ROOT_FOLDER_ID
from the URL.
- Ensure you have write access to the folder and its subfolders.
- Open Google Colab and create a new notebook.
- Copy the contents of
batch_delete_drive_files.py
into a cell in the notebook. - Replace
ROOT_FOLDER_ID
andpattern
with the ID obtained in Step 1 and the pattern you want to match. - Grant Permissions: When prompted, a pop-up window will ask for permissions to access your Google Drive. Make sure to tick all the necessary boxes to grant permissions.
- Run the cell to execute the script.
- Obtain Folder ID: 2-5 minutes
- Check Permissions: 2-5 minutes
- Run the Script: 10-30 minutes (depending on the size of the folder and internet speed)
The script is located in the file batch_delete_drive_files.py
.
- Copy: Copy the script into a new cell in a Google Colab notebook.
- Edit: Replace the placeholder folder ID and pattern with your actual folder ID and the pattern you want to match.
- Execute: Run the cell to start deleting files and folders.
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Drive Folder Copy: Use your browser to copy files from others' shared Google Drive folders to your own Google Drive, all online in the browser.
- no coding required
- browser-based solution
- easy setup
- quick execution
- automated process
- secure
- user-friendly instructions
- error handling
- time-efficient
- online
- Google Drive
- Google Colab
- PyDrive2
- file deletion
- recursive deletion