top of page
CASE STUDY 01
AUTOMATION · LEGAL OPERATIONS · SYSTEMS DESIGN
2025 - 2026
EVIDENCE WORKFLOW AUTOMATION

Moving large evidence files
without moving them by hand.

I designed a lightweight automation that detects incoming evidence archives, extracts and prepares video files, moves them through Dropbox staging, supports Vimeo delivery, and limits unnecessary local storage.

ROLE
Workflow design, scripting, testing, and maintenance
TOOLS
Python, Dropbox, Vimeo, macOS LaunchAgent
ENVIRONMENT
Legal evidence processing on a local office Mac
PRIORITY
Reliability, traceability, and storage control
01

Evidence archives could contain large video files that needed to be downloaded, extracted, identified, renamed, staged, uploaded, and eventually removed from local storage.

Each step was manageable by itself. Together, they created a repetitive process that demanded attention, consumed disk space, and made it easy to lose track of where a file was in the handoff.

 

The goal was not to eliminate human oversight. It was to automate the predictable file-handling work so staff attention could remain on verification and case-related decisions.

THE PROBLEM

The files were digital. 
The workflow was still manual.

01

Large source files

Video evidence could occupy substantial local space during downloading, extraction, staging, and upload.

02

Repeated handoffs

Files moved through several folders and services before reaching their final viewing destination.

03

Inconsistent naming

Useful case identifiers needed to survive the transition from archive to individual video.

04

Limited local storage

Completed files could not remain permanently downloaded on the processing computer.

DESIGN CONSTRAINTS

Automation had to reduce work 
without hiding what happened.

01

Preserve case context

Each processed file needed to retain a recognizable case number or identifying connection to its source archive.

02

Avoid premature deletion

Source and staging files could not be removed before the required handoff steps were complete.

03

Limit dependencies

The system needed to remain understandable and maintainable without introducing a large new software platform.

03

Recover from interruptions

Network delays, unavailable cloud files, and unusually large archives could not be treated as impossible edge cases.

03
~/MediaWorkflow/Staging

Prepared video

Vimeo can import from this folder while the script manages age and storage.

  • Only prepared MP4 files move here

​

  • Staging is temporary

​

  • Old items are purged on schedule

Outgoing

01
~/MediaWorkflow/IncomingArchives

Unprocessed archives

The script watches for new compressed evidence packages.

  • Source archive remains identifiable

     

  • Case-number pattern is checked

     

  • Only expected archive types continue

Incoming

02
Temporary extraction

Controlled local work

Archives are extracted, inspected, and renamed before handoff.

  • Extract video files

​

  • Apply consistent naming

​

  • Skip unrelated file types

Processing

02
THE ARCHITECTURE

Each folder represents 
a different stage of trust.

VALIDATE
STAGE
03
THE AUTOMATED WORKFLOW

A sequence of small checks
replaces one long manual routine.

01
WATCH

Detect a new archive

A macOS LaunchAgent runs the processor on a repeating schedule and checks the Axon folder for new ZIP files.

MIN

5

SCHEDULED LOCAL CHECK
02
IDENTIFY

Find the case number

The script searches filenames for the expected case-number pattern and uses it to maintain a useful connection between the archive and its extracted files.

202XCR000XXX
MATCH
\d{4}CR\d{6}
03
EXTRACT

Prepare only specific media

The processor opens the archive, extracts its contents, locates supported video files, and ignores unrelated material.

.zip
.mp4
.mp4
.mp4
04
RENAME

Carry context forward

Video files receive clearer names tied to the case so they remain understandable after leaving the original archive.

BEFORE

Media_Body_3_VIDEO.mp4

AFTER

202XCR000XXX_Body_3.mp4

05
DELIVER

Move into Vimeo staging

Prepared MP4 files are copied into the Dropbox staging folder, where Vimeo’s connected import process can pick them up.

STAGING
VIMEO IMPORT
06
RELEASE

Reduce the local footprint

Completed source folders are marked online-only where possible, while older staging files are purged after their temporary retention window.

Local storage
Temporary
04
01

Expected file checks

The workflow acts only on recognized archive and media formats rather than indiscriminately moving every file.

RELIABILITY SAFEGUARDS

The useful part of automation is
knowing when to stop.

02

Case pattern validation

Archives that do not contain the expected case number structure can be flagged instead of silently renamed incorrectly.

03

Delayed cleanup

Staging content remains available for a defined temporary period rather than disappearing immediately after processing.

04

Visible logs

Processing output records what was detected, copied, skipped, or interrupted so failures can be investigated.

A REAL EDGE CASE

Cloud files are not always
locally available when expected.

PROCESSOR.LOG
RECOVERABLE INTERRUPTION

[12:05:00] Archive detected

[12:05:01] Waiting for local availability

[12:06:01] TimeoutError: [Errno 60]

​

Next iteration:

retry with availability checks

before extraction begins.

Large archives sometimes produced timeout errors while Dropbox was still making the file available locally. That exposed an important difference between a file appearing in a synced folder and a file actually being ready for local processing.

REPRESENTATIVE IMPLEMENTATION

The script is less complicated
than the process it replaces.

The production script contains additional file handling, logging, and cleanup logic. This abbreviated excerpt shows the central sequence without exposing internal paths or case data.

AXON_VIDEO_PROCESSOR.PY
ABBREVIATED EXAMPLE

def stage_videos(archive_path: Path) -> None:
    record_id = extract_record_id(archive_path.stem)
    if not record_id:
        return

    destination = ARCHIVE_FOLDER / record_id
    if destination.exists():
        return

    with zipfile.ZipFile(archive_path) as archive:
        safely_extract_archive(archive, destination)

    videos = sorted(
        p for p in destination.rglob("*")
        if p.is_file() and p.suffix.lower() == ".mp4"
    )
    for number, video in enumerate(videos, start=1):
        shutil.copy2(
            video, STAGING_FOLDER / f"{record_id}_video_{number}.mp4"
        )

05
THE OUTCOME

The workflow became repeatable 
without becoming invisible.

The finished workflow reduced repetitive handoffs, carried case context forward through more consistent file naming, and eased local storage pressure by keeping downloaded evidence temporary. At the same time, the system remained intentionally lightweight and understandable, making it easier to maintain than a larger black-box solution.

WHAT I WOULD IMPROVE NEXT

The next version should be
more patient with the cloud.

01

Local availability checks

Confirm that Dropbox has fully downloaded an archive before extraction begins.

02

Retry logic

Treat temporary timeouts as recoverable conditions instead of final failures.

03

Processing state

Store a lightweight record of completed archives to make duplicate prevention more explicit.

04

Human-readable reporting

Provide a concise summary of successful files, skipped items, and anything requiring staff review.

bottom of page