A lightning-fast, lightweight directory scanner built in pure C for Windows.
LowTree analyzes your storage using the native Win32 API, providing a clean, terminal-based summary of folder sizes and file counts. It is designed to be highly efficient, bypassing common system pitfalls like symbolic link loops and minimizing unnecessary overhead.
- Native Performance: Built with C11 and the Win32 API for maximum speed and minimal memory footprint.
- Clean CLI: Simple command-line interface with support for specific target paths, help menus, and versioning.
- Accurate Sizing: Recursively calculates true folder sizes (dynamically formatting to MB or GB) and total file counts.
- Safe Traversal: Automatically ignores Junction Points and System Symlinks to prevent infinite scanning loops.
- Unicode Support: Fully handles wide characters (
wchar_t) to correctly process complex Windows paths.
To compile LowTree, you need a modern C toolchain for Windows. The recommended setup uses MSYS2 with the UCRT64 environment.
Ensure you have the following packages installed in your MSYS2 terminal:
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja- Open your UCRT64 terminal and navigate to the project directory:
cd path/to/LowTree - Create a build directory and enter it:
mkdir build && cd build
- Generate the build files using CMake and Ninja:
cmake -G Ninja ..
- Compile the executable:
ninja
Run the compiled executable from your terminal. If no path is provided, LowTree defaults to scanning the C:\ root directory.
Scan the default drive:
.\LowTree.exeScan a specific directory: (Note: Always use quotes if your target path contains spaces).
.\LowTree.exe "C:\Users\YourUser\Desktop"
.\LowTree.exe "D:\Projects"CLI Options:
-h,--help: Show the help message and usage examples.-v,--version: Display the current software version.
LowTree is designed to be modular and easily extensible:
src/main.c: CLI argument parsing and main entry point.src/lowtree.c: Core scanning engine usingFindFirstFileWand recursive traversal logic.include/lowtree.h: Public API declarations.CMakeLists.txt: Build configuration.