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
