Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off &setlocal
- for /f "delims=" %%i in ('dir /b /a-d *.jpg') do ( ::This for loop creates the folders and sorts the files
- set "filename1=%%~i"
- setlocal enabledelayedexpansion
- set "name1=!filename1:~0,11!"
- ren "!filename1!" "!name1!.jpg"
- )
- for /R %%G IN (.) do ( ::This for loop goes through the folders created in the >previous loop< and removed the troopers name from the file name
- )
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement