This tutorial explains how to bulk delete files from Google Drive based on condition. To do this, you can use a free Google Apps Script called DriveWorks which is basically a Google Apps Script. This is an open-source script and acts as a Google Workspace addon. You only need to install and authorize it and then use it to get rid of multiple files matching a specific criterion.
You can delete all the files in Google Drive or after manually selecting them. But if you only want to delete files that matches a pattern then you can’t easily do it. That’s where DriveWorks come in handy. You only need to install it once and then access it directly from the Google Drive. It has a simple UI where you can specify file deleting criterion and then you are all good to go. More details are explained in the next section.
How to Bulk Delete Files in Google Drive Matching a Specific Pattern?
Once the extension has been installed, you need to authorize it. Just click on its icon in the sidebar. After that, you just proceed with the Google authentication.
After successful authentication, you will see the interface of the addon. On the first page, you will have to select what operation you want to perform. It can also rename files in drive but since here we are focusing on deleting so just select the delete operation.
Proceed to the next page and then here it will ask you to specify a pattern. So, enter a text string that you want to match against a file or a folder name. So just do that and then proceed further.
After making sure everything is specified correctly, proceed to apply the operation. Wait while it is deleting files and when it is done, it will show you the delete log that you can find in the Google Sheets.
In this way, you can now easily bulk delete files in Google Drive based on a condition. Just follow the process above and use Drive Works in the exact same way. It is a really handy tool you can use it in this way in your other Google Drive accounts.
If you are looking for a quick way to bulk delete files on Google Drive, then DriveWorks is a good tool for you. If use Drive for programming related stuff or storing log files or something like that then those files have patterns. And this script will help you get rid of them really quick. So, try this script on your own and let me know what you think about it.