Drive ToolboxDrive Toolbox
The Drive Toolbox Interface

Scripts Page

The Scripts page is an integrated development environment for writing and running scripts - this is also how you create reports. We use the Rhai scripting language to query files, apply filters, run Drive Toolbox actions including bulk actions like Delete, Move and Change Sharing, and generate reports.

You can use the integrated AI Assistant to help write a script - but remember, scripts are powerful and AI tools can and do make mistakes. Use of the Dry Run feature to preview what a script will do before your run it.

Layout

The page has a three-panel layout:

PanelDescription
Script Library (left)A folder tree showing your saved scripts. Click a script to open it in the editor.
Editor (center)The script editor where you write and edit code.
Output (right)Displays script execution results, reports, and error messages.

All three panels are resizable by dragging the dividers between them.

Working with Scripts

Creating Scripts

Click the New Script button in the toolbar. Enter a name and the script is added to your library. Scripts are saved to your local database and sync across devices if Sync to Drive is enabled.

Running Scripts

Click Run (or use the keyboard shortcut) to execute the current script. Output appears in the right panel as the script runs. The toolbar shows a running indicator while the script is active.

Dry-Run Mode

Toggle Dry Run before running a script to preview what changes it would make without actually modifying anything. Mutation operations log what they would do instead of executing. This is recommended for testing scripts before running them for real.

Saving

You can save scripts to your local file system. The toolbar shows an unsaved indicator if you have pending changes: the file name will appear in italics.

Script Capabilities

Scripts can:

  • Query files — use filter expressions to build file lists
  • Read file metadata — access name, size, type, owner, sharing, labels, and all other metadata fields
  • Modify files — move, rename, star, set folder color, apply labels and info fields
  • Manage sharing — add, remove, or change permissions
  • Generate reports — produce formatted tables and text output

For the full scripting language reference including all available functions, see Scripting Overview and Script Reference.

Output Panel

The output panel displays results in two formats:

  • Text output — plain text messages, progress updates, and error messages
  • Tables — formatted data tables with headers and rows, useful for file listings and reports

Output from previous runs is cleared when you start a new execution. You can scroll through long output and select text for copying.

Learn More