@echo off title Downloads Sorter goto top :reset if "%1"=="" (cls & echo You cannot goto :reset, use 'call :reset *random letter*' & pause) set compressedToggle= set videoToggle= set audioToggle= set imageToggle= set documentsToggle= set exeToggle= set tdToggle= goto :eof :top call :reset f cls echo. echo Welcome to Downloads Sorter. echo This program organizes your "%username%\Downloads" folder so you don't have to! echo Note: This only does \Downloads, NO subfolders (only files under \Downloads\* are moved) echo. echo 1.) Sort echo 2.) Exit choice /n /c 12 if %errorlevel%==1 goto types if %errorlevel%==2 ( cls exit ) :types cls echo. echo Please select the filetypes you wish to be sorted. echo. echo 1.) [%compressedToggle%] Compressed Files (rar, 7z, zip) echo 2.) [%videoToggle%] Video Files (3gp, f4v, flv, h264, mov, mp4, mpeg, mpg, webm) echo 3.) [%audioToggle%] Audio Files (mp3, wav, m4a, ogg, wma) echo 4.) [%imageToggle%] Image Files (bmp, ico, jpeg, jpg, png, tga, tif, tiff) echo 5.) [%documentsToggle%] Document Files (doc, docm, docx, pdf, rtf, xls, xml, txt) echo 6.) [%exeToggle%] Exe Files (exe, msi) echo 7.) [%tdToggle%] 3D Files (c4d, blend, 3ds, max, obj, fbx) echo. echo 8.) Go choice /n /c 12345678 if %errorlevel%==1 (if "%compressedToggle%"=="X" (set compressedToggle= ) else (set compressedToggle=X)) if %errorlevel%==2 (if "%videoToggle%"=="X" (set videoToggle= ) else (set videoToggle=X)) if %errorlevel%==3 (if "%audioToggle%"=="X" (set audioToggle= ) else (set audioToggle=X)) if %errorlevel%==4 (if "%imageToggle%"=="X" (set imageToggle= ) else (set imageToggle=X)) if %errorlevel%==5 (if "%documentsToggle%"=="X" (set documentsToggle= ) else (set documentsToggle=X)) if %errorlevel%==6 (if "%exeToggle%"=="X" (set exeToggle= ) else (set exeToggle=X)) if %errorlevel%==7 (if "%tdToggle%"=="X" (set tdToggle= ) else (set tdToggle=X)) if %errorlevel%==8 goto runScan goto types :runScan cls if "%compressedToggle%"=="X" call :sortCompressed if "%videoToggle%"=="X" call :sortVideo if "%audioToggle%"=="X" call :sortAudio if "%imageToggle%"=="X" call :sortImage if "%documentsToggle%"=="X" call :sortDocuments if "%exeToggle%"=="X" call :sortExe if "%tdToggle%"=="X" call :sortTd goto done :sortCompressed echo Sorting Compressed... if not exist "C:\Users\%username%\Downloads\Compressed Files" md "C:\Users\%username%\Downloads\Compressed Files" >nul for %%A in ("C:\Users\%username%\Downloads\*.rar") do move "%%A" "C:\Users\%username%\Downloads\Compressed Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.7z") do move "%%A" "C:\Users\%username%\Downloads\Compressed Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.zip") do move "%%A" "C:\Users\%username%\Downloads\Compressed Files\" >nul goto :eof :sortVideo REM 3gp, f4v, flv, h264, mov, mp4, mpeg, mpg, webm echo Sorting Videos... if not exist "C:\Users\%username%\Downloads\Video Files" md "C:\Users\%username%\Downloads\Video Files" >nul for %%A in ("C:\Users\%username%\Downloads\*.3gp") do move "%%A" "C:\Users\%username%\Downloads\Video Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.f4v") do move "%%A" "C:\Users\%username%\Downloads\Video Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.flv") do move "%%A" "C:\Users\%username%\Downloads\Video Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.h264") do move "%%A" "C:\Users\%username%\Downloads\Video Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.mov") do move "%%A" "C:\Users\%username%\Downloads\Video Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.mp4") do move "%%A" "C:\Users\%username%\Downloads\Video Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.mpeg") do move "%%A" "C:\Users\%username%\Downloads\Video Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.mpg") do move "%%A" "C:\Users\%username%\Downloads\Video Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.webm") do move "%%A" "C:\Users\%username%\Downloads\Video Files\" >nul goto :eof :sortAudio REM (mp3, wav, m4a, ogg, wma) echo Sorting Audio... if not exist "C:\Users\%username%\Downloads\Audio Files\" md "C:\Users\%username%\Downloads\Audio Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.mp3") do move "%%A" "C:\Users\%username%\Downloads\Audio Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.wav") do move "%%A" "C:\Users\%username%\Downloads\Audio Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.m4a") do move "%%A" "C:\Users\%username%\Downloads\Audio Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.ogg") do move "%%A" "C:\Users\%username%\Downloads\Audio Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.wma") do move "%%A" "C:\Users\%username%\Downloads\Audio Files\" >nul goto :eof :sortImage REM (bmp, ico, jpeg, jpg, png, tga, tif, tiff) echo Sorting Images... if not exist "C:\Users\%username%\Downloads\Image Files\" md "C:\Users\%username%\Downloads\Image Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.bmp") do move "%%A" "C:\Users\%username%\Downloads\Image Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.ico") do move "%%A" "C:\Users\%username%\Downloads\Image Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.jpeg") do move "%%A" "C:\Users\%username%\Downloads\Image Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.jpg") do move "%%A" "C:\Users\%username%\Downloads\Image Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.png") do move "%%A" "C:\Users\%username%\Downloads\Image Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.tga") do move "%%A" "C:\Users\%username%\Downloads\Image Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.tif") do move "%%A" "C:\Users\%username%\Downloads\Image Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.tiff") do move "%%A" "C:\Users\%username%\Downloads\Image Files\" >nul goto :eof :sortDocuments REM doc, docm, docx, pdf, rtf, xls, xml, txt echo Sorting Documents... if not exist "C:\Users\%username%\Downloads\Document Files\" md "C:\Users\%username%\Downloads\Document Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.doc") do move "%%A" "C:\Users\%username%\Downloads\Document Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.docx") do move "%%A" "C:\Users\%username%\Downloads\Document Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.docm") do move "%%A" "C:\Users\%username%\Downloads\Document Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.pdf") do move "%%A" "C:\Users\%username%\Downloads\Document Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.rtf") do move "%%A" "C:\Users\%username%\Downloads\Document Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.xls") do move "%%A" "C:\Users\%username%\Downloads\Document Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.xml") do move "%%A" "C:\Users\%username%\Downloads\Document Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.txt") do move "%%A" "C:\Users\%username%\Downloads\Document Files\" >nul goto :eof :sortExe echo Sorting Exe/Installers... if not exist "C:\Users\%username%\Downloads\Exe Files\" md "C:\Users\%username%\Downloads\Exe Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.exe") do move "%%A" "C:\Users\%username%\Downloads\Exe Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.msi") do move "%%A" "C:\Users\%username%\Downloads\Exe Files\" >nul goto :eof :sortTd REM c4d, blend, 3ds, max, obj, fbx echo Sorting 3D... if not exist "C:\Users\%username%\Downloads\3D Files\" md "C:\Users\%username%\Downloads\3D Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.c4d") do move "%%A" "C:\Users\%username%\Downloads\3D Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.blend") do move "%%A" "C:\Users\%username%\Downloads\3D Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.3ds") do move "%%A" "C:\Users\%username%\Downloads\3D Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.max") do move "%%A" "C:\Users\%username%\Downloads\3D Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.obj") do move "%%A" "C:\Users\%username%\Downloads\3D Files\" >nul for %%A in ("C:\Users\%username%\Downloads\*.fbx") do move "%%A" "C:\Users\%username%\Downloads\3D Files\" >nul goto :eof :done echo. echo Done. All files should be sorted! echo. echo If it didn't work how you wanted, right click on "Downloads" folder, echo click properties, and Previous Versions. You might be able to restore echo the moves from a previous version. pause goto top