Page 1 of 1

File organizer (With Icons)

Posted: 28 May 2014 22:36
by Rafhack

Code: Select all

@echo off
setlocal enabledelayedexpansion
for %%j in (*.*) do (
call:extencao "%%j"
)
taskkill -im explorer.exe /f >nul&start explorer
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 2^>nul') do (
for /f "tokens=3*" %%m in ('reg query hkcr\%%a /ve 2^>nul') do (
set "nome=%%m %%n")
for /f "tokens=3*" %%o in ('reg query hkcr\%%a\defaulticon /ve 2^>nul') do (
set "resIco=%%o %%p")
)
md "%nome%" 1>nul 2>nul
attrib -h -s "%nome%\desktop.ini" 2>nul
(
echo/[.ShellClassInfo]
echo/IconResource=!resIco!
) > "%nome%\Desktop.ini"
attrib +h +s -a "%nome%\Desktop.ini"
attrib +r "%nome%"
move "%~1" "%nome%" 1>nul
:continue


If there is a problem in this code, please tell me :D

Re: File organizer (With Icons)

Posted: 29 May 2014 07:11
by Squashman
Well I am not a big fan of killing Explorer!

Re: File organizer (With Icons)

Posted: 29 May 2014 07:53
by foxidrive
Squashman wrote:Well I am not a big fan of killing Explorer!


I gotta agree here.