Google Drive is the favorite choice of personal storage for many users. It offers 15GB of free storage for all users. One can pay to increase their storage limit. Over time, your Drive storage gets exhausted. You may want to free up some space by finding the big files.
There's no straightforward way to find the big files. There are some tricks to sort files by size on Google Drive, using which you can delete unwanted large files.
In Google Drive, folders are just another file with the mime-type
application/vnd.google-apps.folder. Hence, they mimic the functionality of a folder.
Every file on Google Drive has an ID & a parent ID. Parent ID is the ID of another file with the mime-type
application/vnd.google-apps.folder. This explains why everything on Google Drive is a file.
The simplest way to check the folder size is, downloading the folder and checking its size. But, it may not be convenient all the time. This post will explain 3 different ways that don't involve downloading the folder.
Using Drive Explorer to view the folder size on a web app or in a Google Sheet
Drive Explorer is a Google add-on that lets you list file metadata on the browser or in a Google Sheet. The good thing about this method is Drive Explorer is a web app.
You don't need to install any application in your system. You can add Drive Explorer to your Google account and start using it.
Also with Drive Explorer, in addition to folder size, you get a lot of info about your files on Google Drive like who has what access to the file, download links, the path of the file, image links, created/modified at timestamp, last modifying user and much more.
On the workspace marketplace page, click install and authorize access to your files. After installing, you can either use it from your Google Drive dashboard or from a Google Sheet.
From Google Drive Dashboard
- Install Drive Explorer.
- Select one or more folders for which you want to know the size.
- Right-click and select Open with → Drive Explorer.
- On the page opened, check Folder Size.
You will see something similar to the following image once you complete the 4 step process.
From a Google Sheet
You can even rename files/descriptions & share files directly from a Google Sheet with Drive Explorer in addition to finding folder size.
- Install Drive Explorer.
- Open a Google Sheet and select Extensions → Drive Explorer → Start Export → Selected items.
- Select Add items and select one or more folders (Hold Ctrl/Cmd to multi-select).
- Click on Export details to list the files.
- Folder Size is not populated by default. So, to bring to Google Sheet, select Extensions → Drive Explorer → Choose display fields. Check Folder Size and save.
Now, you will see the Folder Size column on the sheet.
Using Drive for desktop to check the Google Drive folder size from file explorer
Google Drive has a desktop app for all operating systems. It can help you find the size of your folders. Download and install it in your system.
Open the app and log in with your Google account. As soon as you open the app, it will start to stream your files. It means your system will have a copy of your Google Drive metadata. Note that it is just the metadata, not the original files, so those won't take any space in your local disk.
Once the setup is done, you will see Google Drive mounted as a filesystem on your file explorer app. You can check the size of any Google Drive folder just like you would check your local folders.
On Windows, you can right-click → Properties. On Mac, you can right-click → Get Info. Check the image below. You can see that even though the folder size is 107KB, it takes no space on the disk.
If you want, you can change the sync option to 'Mirror files' from the preferences menu to have all files available on your system ready to be used offline.
Using Rclone to get the folder size in a CLI
Rclone is an open-source command-line tool for managing files on different cloud services. It offers a lot of functionalities. Viewing the size of directories is one of them. You can download the appropriate binary for your operating system from the Rclone downloads page.
With Rclone, you get the size of a Google Drive file/folder by issuing a command. Refer to the below prompt. Here, I'm getting the size of the folder 'Animals' in my Google Drive. Continue reading to know how to configure and use Rclone.
rclone size mydrive:Animals
Total objects: 5
Total size: 247.929 KiByte (253879 bytes)
After installing, open the terminal program of your choice, and run the following command.
Now, you need to create a 'remote' for Google Drive. Remote is the channel through which you will access cloud vendors in Rclone. Press
Enter to create a new remote. Input a word of your choice and press
Enter. You will use this word later to access Google Drive.
After that, the command prompt will ask you to pick a storage. For Google Drive, type 'drive' and press
Client ID and secret, we will use the default options provided by Rclone. Press
Enter twice. Now, you need to give permissions to Rclone. You can pick a number between 1 to 5. If you're going to use Rclone only to check the size of files/folders, you can give read-only access to Rclone, which means you need to enter 2.
You can press
Enter again to let Rclone access files from your Google Drive root.
Next, Rclone will ask for service account config. You can press
Enter to skip this step. Press
Enter again to skip advanced config.
Now, Rclone will ask if you want to use auto config. If you are setting this up in your machine, you can press
Enter and continue. If you are in a remote/headless terminal session, you need to press
N so that Rclone can change the OAuth flow accordingly.
If you are not on a remote/headless session, Rclone will open your browser. You need to authenticate a Google account and go back to your terminal.
Next, Rclone will ask if you want to configure the remote for a Shared Drive. After your choice, Rclone will ask to save your remote. Press
Enter to save. Now, the setup is done. Press
Enter to exit.
The setup to access Google Drive with Rclone is completed now. To check a Google Drive folder's size from your terminal, you can issue the following command.
rclone size <remote>:<folder path from root>
If the folder is not in the root of your Google Drive, give the path to the folder from the root. For example, let's say the folder 'Wild' is inside the folder 'Animals', which is in the root folder. Then, I can issue the following command to get its size.
rclone size mydrive:Animals/Wild
Total objects: 2
Total size: 143.103 KiByte (146537 bytes)
Things to note when using
rclone size command,
- Params are case sensitive.
- It recursively drills down the folder tree to get the size of a folder.
- Spaces in the name of files/folders should be escaped with a forward slash. For instance, to get the size of the folder
Folder with spacein the root directory, you need to issue the following command,
rclone size mydrive:Folder\ with\ space
Total objects: 1
Total size: 124.982 KiByte (127982 bytes)
I have built an app to check the things that matter to you the most with a single click. If this interests you, you can give it a try on getradar.co.