Advertisement
Guest User

Untitled

a guest
Jun 21st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.40 KB | None | 0 0
  1. @echo off &setlocal
  2. for /f "delims=" %%i in ('dir /b /a-d *.jpg') do ( ::This for loop creates the folders and sorts the files
  3.     set "filename1=%%~i"
  4.     setlocal enabledelayedexpansion
  5.     set "name1=!filename1:~0,11!"
  6.     ren "!filename1!" "!name1!.jpg"
  7. )
  8.  
  9. 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
  10.    
  11. )
  12. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement