FOLDERLOGGER

A zero-dependency, hardened Windows Batch utility designed to instantly map, count, and export two-tier folder tree structures via drag-and-drop.

What is FolderLogger?

FolderLogger is an ultra-lightweight Windows Batch script engineered to scan complex directory hierarchies safely and efficiently. Designed for seamless user experience, it allows users to simply drag and drop any target folder directly onto the script file icon.

It processes main directories in strict alphabetical order, indexes nested subfolders, safely handles special characters, and exports clean, formatted audit logs directly to your Desktop with automatic, collision-free file versioning.

Key Capabilities

How to Use

  1. Download & Extract: Download FolderLogger.zip and extract FolderLogger.bat anywhere on your computer (or keep it on your Desktop).
  2. Locate the target directory you wish to inspect and generate a log for.
  3. Drag and Drop the folder directly onto the FolderLogger.bat icon.
  4. View live output directly in the Command Prompt window as main folders and subdirectories are parsed.
  5. Check your Windows Desktop for the newly generated .txt report file!

Output Structure Preview

Below is an example of the structured text report generated on your Desktop when scanning a folder named Projects:

Folder Log for: Projects 
Generated on: 10/24/2026 at 14:32:01.45 
---------------------------------------
01 - Client Archive
     - 2025 Financials
     - 2026 Proposals
02 - Active Deliverables
     - Assets
     - Source Files

---------------------------------------
Total:
Main Folder - 2
Sub Folder - 4
---------------------------------------

Script Architecture Breakdown

Inside the script's internal logic and safety procedures:

[01]
Input Validation Engine

Evaluates argument %~1 against trailing slashes to confirm if the input is empty or a plain file, redirecting to custom error routines.

[02]
Desktop Path Resolution

Resolves output path via system environment variable %USERPROFILE%\Desktop to guarantee portable execution across accounts.

[03]
Collision Avoidance Loop

Executes an internal iteration loop verifying exist checks, dynamic number increments, and clean file naming.

[04]
Delayed Expansion Isolation

Toggles enabledelayedexpansion strictly within isolated blocks for numerical zero-padding (01, 02), preserving path safety.

[05]
Subfolder Nesting Scanner

Forks secondary directory searches for subfolders per main directory with stderr redirection (2>nul) for silent operation.

[06]
Real-Time Terminal Dual Output

Simultaneously streams progress outputs to stdout CMD console stream and appends (>>) directly to the target log file.