I've found this script but is not doing what i want.
So far this script is running only in the folder where it is. I want to point the folder that I want to process...don't know if it's clear?
Code: Select all
@echo off
SUBST C:\
set "basename=."
for /F "tokens=1* delims=." %%a in ('dir /B /A-D ^| sort /R') do (
set "filename=%%a"
setlocal EnableDelayedExpansion
for /F "delims=" %%c in ("!basename!") do if "!filename:%%c=!" equ "!filename!" (
set "basename=!filename!"
md "!basename!"
)
move "!filename!.%%b" "!basename!"
for /F "delims=" %%c in ("!basename!") do (
endlocal
set "basename=%%c
)
)
Thank you