An organizer batch
Posted: 05 May 2014 09:56
This code can organize files by type. It querys on Windows registry for the file types, then gets its names.
You just need to execute it on your messed folder, even on desktop.
You just need to execute it on your messed folder, even on desktop.
Code: Select all
@echo off
setlocal enabledelayedexpansion
for %%j in (*.*) do (
call:extencao "%%j"
)
echo/Concluido&pause>nul&exit
:extencao
if "%~1" == "%~nx0" (
goto continue)
echo/%~1
set "ext=%~x1"
for /f "tokens=3" %%a in ('reg query hkcr\!ext! /ve') do (
for /f "tokens=3*" %%m in ('reg query hkcr\%%a /ve') do (
set "nome=%%m %%n")
)
md "%nome%" 1>nul 2>nul
move "%~1" "%nome%" 1>nul
:continue