NL DAT Exporter — Project Write-up

Published:

NL DAT Exporter is a standalone Windows GUI tool for collecting Neurolucida .DAT files from a source data folder, validating their filenames against configurable lab conventions, and copying passing files into a clean export folder. I built it to make a repetitive microscopy data-management task safer, faster, and easier to audit.
Python PySide6 Scientific Workflow Data Validation Windows GUI Reproducible File Handling
Standalone utility for validating and exporting Neurolucida DAT files.

Context

Neurolucida exports can produce many .DAT files spread across nested folders. Before those files can be batch analyzed or pooled, they need to be checked for naming consistency, copied into a clean location, and documented so the export can be reviewed later.

Manually doing this is error-prone. It is easy to overlook a malformed filename, accidentally overwrite a duplicate file, or lose track of which files were included. NL DAT Exporter was designed to make that process explicit: scan first, validate names, copy only passing files, and write a report of what happened.


The Problem

The lab needed a simple way to collect Neurolucida .DAT files while enforcing a consistent file-naming convention. The tool had to be usable by people who do not want to run command-line scripts or have local Python environments, and it had to preserve the original source data to avoid accidental modifications. The main requirements were:

  • recursively find target .DAT files
  • validate filenames against expected lab conventions
  • preview failures before copying anything
  • avoid overwriting duplicate filenames
  • leave original source files unchanged
  • create a clean export folder for downstream analysis
  • produce a record of each export run for auditing and reproducibility

What I Built

Standalone Windows GUI

I built the app as a small Windows desktop utility. Users select a source data directory, choose an export parent directory, and then either run a validation-only “dry run” or perform a real export operation.

Dry run workflow

The dry run mode scans the selected folder, validates filenames, and reports pass/fail results without creating folders, copying files, or writing reports. This gives users a low-risk way to find naming problems before committing to an export.

Safe export workflow

A real export creates a new timestamped folder, copies only files that pass validation, skips failed files, and prevents duplicate output filenames from being overwritten. The original files remain in place for maximum safety.

Configurable filename rules

The Settings dialog allows users to adjust the target file extension, ignored folders, case sensitivity, strict section ordering, expected filename sections, separators, and validation patterns. A live preview box lets users test sample filenames before running a full scan.

Audit-friendly outputs

Each real export writes two files:

  • export_report.csv, a spreadsheet-friendly summary of discovered files, statuses, failure reasons, and source paths
  • export_manifest.json, a structured audit record containing export settings, summary counts, duplicate groups, and per-file copy status

Results

NL DAT Exporter turns a manual file-cleanup step into a repeatable workflow with explicit validation and reporting. It is intentionally narrow in scope: it does not modify source data, attempt to analyze morphology, or hide failed files. Instead, it provides a safer bridge between raw Neurolucida exports and downstream analysis.

The first release fulfilled the core requirements and has been used successfully by the lab. The app has helped catch filename issues early, prevented accidental overwrites, and created a clear audit trail for exported data. Future improvements could include support for additional naming conventions, more advanced validation rules, and a cross-platform version.


Technical Details

The application is written in Python with a PySide6 graphical interface and packaged as a one-file Windows executable using PyInstaller. User settings are stored locally in an INI file so the executable can remain portable while preserving user configuration between sessions.

A hidden smoke-test mode is included for release validation, checking that the packaged executable can construct the UI, persist settings, complete a dry run, and write expected export artifacts during a real export.


AEWorthy/NL_DAT_Exporter