Auto-organize your google drive using the power of shell
This script helps you move files to the corresponding folders such as:
- Using file extension:
- Move files with png, jpg, PNG, and JPG extensions to folder photos
- Move files with gdoc extensions to the folder gdoc (Normally your google docs, sheet, form, and slides files will be saved directly in the My Drive folder, this makes the Drive folder become a mess)
- Using file name:
- Move gdoc files with Untitled in name to folder Untitled
And many more options which you can custom yourself!
- Already installed Google Drive for desktop. If not, click here to download it from Google.
photos
folder for the pictures of your family, if you do not adjust the script, it will copy all other photos from My Drive
to your photos
folder.
- Download the repo to your computer, or clone it:
- New Terminal (or Command Prompt,...) at the folder you just downloaded and run:
chmod u+x auto.sh
./auto.sh "<path of your google drive folder>"
To get the path of your Google Drive folder, new Terminal (or Command Prompt,...) in the Google Drive folder and run: pwd
. This will print the path to the screen.
Usually, the path will contain space: My Drive, so you need to quote the path.
Update soon...
Schedule help this script run automatically every day (or every minute, every week,...).
Update soon...
Development discussion:
- Difference between the default environment for a cron job and the user's environment.