# ZDDC Classifier

### Folder Tree

Auto-scroll Hide Compliant
Show Unassigned Assigned Excluded Empty

### Files

0 files 0 modified 0 errors
| SHA256
|

# | Original Filename | Ext | New Filename | Tracking | Rev | Status | Title | SHA256
--- | --- | --- | --- | --- | --- | --- | --- | ---

|
Folders join with “-” into the tracking number; the leaf folder is the revision — name it like “A (IFR)”.
<party>/{received,issued}/<transmittal>. Drag files (or a whole folder) into a transmittal.

# ZDDC Classifier

Turn a messy folder of project files into clean, correctly-named ZDDC documents — organized by tracking number and transmittal — without ever changing your originals.

## Your workspaces

### ① Classify & copy recommended · non-destructive

Build a tidy copy of a project in a separate output folder. Your source files are only ever read, never renamed or moved.

1. New workspace → pick a folder. It scans once and saves to this browser, so you can close the tab and pick up later.
2. Preview a file (single-click it in the left tree) to see what it actually is.
3. Drag it onto the right pane — onto a tracking-number folder (the folder path becomes the number, the leaf is the revision, e.g. `A (IFR)`), and onto a transmittal (party + date + TRN/SUB + sequence).
4. Copy when ready → choose an output directory; renamed copies are written as `<party>/<transmittal>/<name>`, with duplicates detected.

### ② Rename in place edits your files

A quick spreadsheet for a folder you own: fill in tracking number, revision, status and title, and rename the files on disk.

1. Click Use Local Directory (top bar) to open a folder.
2. Switch the toggle to Rename in place.
3. Edit cells (or paste columns from Excel); names already in ZDDC format are parsed automatically and validated as you type.
4. Save All renames the files where they sit.

### ⚠️ Browser Not Supported

This application requires the File System Access API, available only in Chromium-based browsers (Chrome, Edge, Brave, Opera).

Everything runs in your browser — no files are uploaded. Tip: if your folder lives on OneDrive/SharePoint, set it to “Always keep on this device” first for a much faster scan.

## Help — ZDDC Classifier

### What is the Classifier?

The Classifier is a spreadsheet-based tool for renaming files to ZDDC naming conventions. It reads a folder of files and presents them in an editable grid where you can set tracking number, revision, status, and title — then saves the renamed files back to disk.

### Getting Started

1. Click Use Local Directory to open a folder containing files to rename.
2. The folder tree on the left shows all sub-folders. Click a folder to load its files.
3. Edit cells in the spreadsheet to set the new filename components.
4. Click Save All (or save individual rows) to rename the files on disk.

### Folder Tree

Multi-select
  Hold `Ctrl` and click to select multiple folders. Hold `Shift` to select a range. Files from all selected folders are shown together.
Hide Compliant
  Hides folders where all files already have valid ZDDC names, letting you focus on work remaining.
Auto-scroll
  When enabled, the folder tree scrolls to highlight the folder containing the row you are editing.

### Spreadsheet Editing

Direct cell editing
  Click any cell in the New Filename, Tracking, Rev, Status, or Title columns to edit it. Press `Enter` to confirm, `Escape` to cancel.
RC References
  Type a formula like `=R[-1]C` to copy the value from the cell one row above in the same column — similar to Excel relative references.
Regex capture groups
  Type a formula like `=RE(RC[-3], "(\w+)-(\d+)", "$1")` to extract a pattern from another cell using a regular expression.
Validation
  Cells are validated automatically. Invalid values are highlighted in red. The New Filename column shows the composed result.
Column Filters
  Each column header has a filter input. Supported syntax:

`term`
  Contains "term" (case-insensitive)
`!term`
  Does not contain "term"
`^term`
  Starts with "term"
`term$`
  Ends with "term"
`a b`
  Matches both (AND)
`a | b`
  Matches either (OR)
`^IFA | ^IFB`
  Starts with IFA or IFB
`!^~`
  Does not start with ~ (excludes drafts)
`el.*spc`
  Regex: contains "el" followed by "spc" (use `.` for any char, `.*` for any sequence)
`[ei]fa`
  Regex character class: matches "efa" or "ifa"

### Saving Files

Save All
  Renames all modified files in one operation. Confirms before proceeding.
Cancel All
  Reverts all unsaved edits back to the original filenames.
SHA256
  Enable to compute a cryptographic hash of each file. Use Export Hashes to save a `sha256sum`-compatible file.

### ZDDC Filename Format

The required format is:

`TRACKINGNUMBER_REVISION (STATUS) - Title.ext`

Example: `123456-EL-SPC-2623_A (IFR) - Electrical Specification.pdf`

Valid statuses: IFA, IFB, IFC, IFD, IFI, IFP, IFR, IFU, REC, RSA, RSB, RSC, RSD, RSI, ---