Easily Check the Directory Size in Google Drive

Google Drive and Google Colab
  1. Open Google Colab
  2. Upload the provided notebook
  3. Enter the path into the easy-to-use widget

Open Google Colab and Upload the Notebook

Go to the Google Colab website here:
colab.research.google.com/

You will see this window when opening Google Colab. Press the “Upload” tab which is highlighted in the image
Notebook is now uploaded
Running the cell will result in this prompt
Permissions required for Google Colab to access your Google Drive. Click “Allow”
Copy and paste the code that is given (Note: I censored most of mine to be safe)
Successful Google Drive mount
Drive’s folders are grey by default. Colab notebooks are stored in a yellow folder.

How to Find the Directory Path and Calculate Directory Size

Once it is mounted you can access your drive using the explorer. Click the folder icon and navigate to the folder you want to check the file size of. Right click on the folder and click “Copy Path”.

Opening the Notebook Again

Click the notebook which should open the preview window. Click the option to run it with Google Colaboratory at the top to launch the notebook in Google Colab. Remember that you have to mount your Google Drive every time you open the notebook.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Panji Brotoisworo

Panji Brotoisworo

Researcher working on geospatial sciences and general programming