A zero-dependency, hardened Windows Batch utility designed to instantly map, count, and export two-tier folder tree structures via drag-and-drop.
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.
chcp 65001) to accurately print foreign letters, symbols, and special characters.FolderName_log (2).txt on collision.! or % characters.DIR /b /ad /on) for predictable output sorting.FolderLogger.zip and extract FolderLogger.bat anywhere on your computer (or keep it on your Desktop).FolderLogger.bat icon..txt report file!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
---------------------------------------
Inside the script's internal logic and safety procedures:
Evaluates argument %~1 against trailing slashes to confirm if the input is empty or a plain file, redirecting to custom error routines.
Resolves output path via system environment variable %USERPROFILE%\Desktop to guarantee portable execution across accounts.
Executes an internal iteration loop verifying exist checks, dynamic number increments, and clean file naming.
Toggles enabledelayedexpansion strictly within isolated blocks for numerical zero-padding (01, 02), preserving path safety.
Forks secondary directory searches for subfolders per main directory with stderr redirection (2>nul) for silent operation.
Simultaneously streams progress outputs to stdout CMD console stream and appends (>>) directly to the target log file.