Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Google Drive Organizer

Utilities for organizing files in Google Drive.

Requirements

  • Python 3.8+
  • A Google Cloud project with the Drive API enabled
  • credentials.json from the Google Cloud Console

Setup

pip install -r requirements.txt

Place credentials.json in this directory. On first run, the browser will open for OAuth consent — a token.json is saved afterward for subsequent runs.

Scripts

organizer.py - UNTESTED

Multi-step configurable organizer. All settings are at the top of the file:

Setting What it controls
SOURCE_FOLDER_ID Folder to scan
SEARCH_RECURSIVE Scan subfolders
FILE_TYPE image, video, or custom (with CUSTOM_MIME_TYPES)
MAX_FILES_PER_FOLDER Files per destination folder
FOLDER_PREFIX Destination folder name prefix
DESTINATION_PARENT_FOLDER Where to create destination folders
SORT_BY / SORT_ORDER File ordering before assignment
DRY_RUN Safety flag — preview without moving
SKIP_EXISTING_ORGANIZED_FOLDERS Avoid re-scanning organized folders
SKIP_FOLDERS Folder names to exclude during scan

Discovers existing destination folders (e.g. Photos 001), counts their contents, fills partially full folders first, creates new ones as needed, and skips already-placed files on re-run. Outputs a CSV report with rollback info.

python organizer.py

main.py

Original single-pass script. Scans a single folder for images, creates Photos 001–Photos NNN, and moves files.

python main.py

list-files.py

Read-only inventory tool. Scans the entire Drive, builds a directory tree, and writes drive_folder_report.csv with file counts and sizes per folder.

python list-files.py

CSV Reports

Every script that moves files writes a move_plan.csv with columns: file_name, file_id, current_folder, target_folder, current_path, target_path, mime_type, size. This doubles as a rollback log — each file can be moved back to its original folder using its file_id and current_path.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages