Najeebsk

RENAME.bat

Mar 21st, 2022 (edited)
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.91 KB | None | 0 0
  1. @ECHO OFF
  2. TITLE ~~~*** NAJEEB FILES RENAME ***~~~
  3. COLOR 1B
  4. Mode con cols=75 lines=9
  5. :home
  6. ECHO                    ~~~*** NAJEEB SHAH KHAN FILES RENAME ***~~~
  7. ECHO                           %TIME%  %DATE%
  8. ECHO  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  9. ECHO.
  10. echo                 0) Najeeb Commands
  11. echo                 1) File Extension Change
  12. echo                 2) File Rename Numerical Numbers
  13. echo.
  14. set /p web=TYPE OPTION:
  15. if "%web%"=="0" goto nsk
  16. if "%web%"=="1" goto ext
  17. if "%web%"=="2" goto ren
  18. pause:
  19. set /p MT= Type GO TO Here:
  20. Pause:
  21. CALL GOTO %MT%
  22. ::============================NSK COMMANDS==============================
  23. :nsk
  24. cls
  25. ECHO                  ~~~*** NAJEEB SHAH KHAN CMD COMMANDS***~~~
  26. echo                           %TIME%  %DATE%
  27. echo  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  28. ECHO    ~**Most Commonly Used Internal and External DOS Commands Exmple**~
  29. ECHO.
  30. Echo    TYPE:COMMANDS
  31. Echo    ATTRIB,CALL,CD,COPY,CLS,CLIP,DATE,DEL,DIR,EDIT,
  32. Echo    ERASE,EXIT,FIND,FINDSTR,FOR,FORMAT,HELP,IF,
  33. Echo    MD,MKDIR,MOVE,PATH,PAUSE,RD,RMDIR,REN,RENAME,
  34. Echo    SET,SORT,TIME,TREE,TYPE,UNDELETE,VER,VOL,WMIC
  35. ECHO.
  36. set /P "input=Command: "
  37. call %input%
  38. pause:
  39. goto home
  40. ::============================Extension==============================
  41. :ext
  42. set /p input= Original File Type Change Extension Only =
  43. set /p input2= Type Change Extension Only =
  44. ren *.%input% *.%input2%
  45. Pause:
  46. goto home
  47. ::============================Rename==============================
  48. :ren
  49. set /p start=Please Enter The Starting Control Number:
  50. set /p ALP=Please Enter Alphabet :
  51. set /p EXT=Please Enter Extension :
  52. setlocal enableDelayedExpansion
  53.  
  54. for /r %%g in (*.%EXT%) do (call :RenameIt %%g)
  55. goto :eof
  56. goto :exit
  57.  
  58. :RenameIt
  59. echo Renaming "%~nx1" to !start!%~x1
  60. ren "%~nx1" %ALP%!start!%~x1
  61. set /a start+=1
  62. goto :eof
  63.  
  64. :exit
  65. exit /b
Add Comment
Please, Sign In to add comment