A Python-based command-line tool to upload, download, browse, and delete files/folders on your Google Drive, using your own Google API credentials.
- Browse Google Drive folders interactively.
- Upload local files/folders to any Drive location.
- Download files/folders with original names.
- Navigate into Drive folders before downloading or deleting.
- Delete specific files or folders from Drive.
- Uses
token.jsonfor secure OAuth2 authentication.
- Go to Google Cloud Console.
- Create a project (or use an existing one).
- Enable Google Drive API for the project.
- Go to Credentials β Create OAuth client ID β Choose Desktop App.
- Download the
credentials.jsonfile.
Place your files like this:
your_project/
βββ drive.py
βββ tokens/
βββ credentials.json # β from Google Cloud Console
π token.json will be automatically generated after first successful login.
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
python drive.py
Youβll be prompted with a menu
- On first run, your browser will open for Google login and authorization.
- Your access token will be stored in
tokens/token.jsonfor future use. - All downloads preserve original file/folder names.
- Folder navigation and actions are recursive and menu-driven.