Saturday, October 3, 2026

Turn mess of files into order with just a few lines of Batch magic! 🚀

 @echo off

setlocal enabledelayedexpansion

for %%a in (*.*) do (

    if "%%~xa" NEQ "" if /I "%%~fa" NEQ "%~f0" (

        set "ext=%%~xa"

        set "ext=!ext:~1!"

        if not exist "!ext!" mkdir "!ext!"

        move "%%a" "!ext!\"

    )

)

endlocal


This script auto-sorts files into folders by extension—because the desktop deserves better than clutter. 💻✨

No comments :