Dec 23, 2015 10:37 PM
(This post was last modified: Dec 28, 2015 09:11 AM by wurd.)
Short but sweet code, drag and drop a mess of programs and the code organizes the programs by their extensions.
Merry Christmas 🤝
Code
@echo off & setlocal EnableDelayedExpansion
for %%A in (%*) do (
set /a x+=1
set prog!x!=%%A
set progext!x!=%%~xA
)
for /l %%A in (1,1,!x!) do (
if "!progext%%A!"=="" set progext%%A=Folders
if not exist "%cd%\!progext%%A!" md "%cd%\!progext%%A!"
for /l %%B in (%%A,1,!x!) do (
if exist "!prog%%B!" if "!progext%%A!"=="!progext%%B!" move !prog%%B! !progext%%A!
))
cls & echo Finished. Cleaned !x! Programs up.
Pause > nul



![[Image: 0UhKI.gif]](https://i.imgur.com/0UhKI.gif)