Organize Drive Files

A helpful Google App Script for Efficient Google Drive File Management.

To use the below App Script, follow the below steps:

Overview

Firstly, you have the overall organization of categories, such as "Freshman" or "10th Grade." Then, you have the general categories under that folder, such as "Physics," "Math," or "Engineering." Lastly, you organize under those general categories by month shortened to a certain number of characters, such as "Jan" or "Feb." You can control the overall organization, general categories, and number of characters of the month with the variables. You should also update your email address.


First, you should decide what your general categories are and create the folders in your main folder. Use `|` for separating these key terms and, additionally, include carot `^` at the start if relevant to match from the start. Update the variables and key terms below. Then, put your email address in the below, else it will not match and potentially send an error since you do not own the file you're moving. Lastly, update the number of characters of the month if necessary.

var categories = {

  'Math': /Math/,

  'Engin': /Engin|Engineering,

  'Physics ': /^Physics|Phys|PHYS/

};

var yourDriveEmail = "yourEmailAddress";

var lengthOfMonthName = 3;

var mainFolderName = "mainFolderName";



This tool automates Google Drive organization, so if you are a power-user or likely to need such a tool after months of letting files pile up, I highly suggest taking a look and customizing this script for simplifying your workflow. However, if you are organizing a file once a week or more infrequently, this custom productivity solution for file sorting on large google drives is definitely overkill. I do not think this would be the correct productivity tool to enhance or optimize file sorting in this case. Programmatically, the Google Drive file system is fairly complex, and using this script without putting in some time to understand it is highly advised against. So, do not use this if you have limited familiarity with JavaScript and/or a similar workflow.

Here is the helpful Google App Script: