Advertisement
Hugo7

Batch renaming of z2f lang folders.bat

Aug 7th, 2022
1,264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.02 KB | None | 0 0
  1. @echo off
  2. :: By Hugo7 on TRT
  3. :: I'm not responsible for any damage caused by this script, especially if incorrectly configured.
  4.  
  5. :: PLEASE CHECK ALL LINES BEGINING WITH "SET" - THESE ARE YOUR PARAMETERS
  6.  
  7.  
  8. :: >>BEGIN USER CONFIG SECTION
  9.  
  10. :: Path to 7z.exe file on your computer
  11. set exe7z=C:\Program Files\7-Zip\7z.exe
  12.  
  13. :: Lang code of the zt2 mod you downloaded (default : english 1033)
  14. set lang1=1033
  15.  
  16. :: Your lang code (of your installed zt2)
  17. set lang2=1036
  18.  
  19. :: Path to the folder where you put the mods you just downloaded
  20. set downloads=C:\Users\Hugo\Downloads\z2f
  21.  
  22. :: >>END USER CONFIG SECTION
  23.  
  24.  
  25. :: Checking if your config is right
  26. if not exist "%exe7z%" (
  27.     echo Incorrect 7z.exe file location
  28.     pause
  29.     exit /b
  30. )
  31. if not exist "%downloads%" (
  32.     echo Incorrect downloads folder location
  33.     pause
  34.     exit /b
  35. )
  36.  
  37. pushd "%downloads%"
  38.  
  39. :: Batch renaming line code, using 7zip line command features
  40. for /f "tokens=*" %%A in ('dir /b ^| find /i ".z2f"') do "%exe7z%" rn "%%A" "lang/%lang1%" "lang/%lang2%"
  41.  
  42. popd
  43. pause
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement