Advertisement
Najeebsk

RENAME-CMD.bat

Mar 23rd, 2022
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.93 KB | None | 0 0
  1. @ECHO OFF
  2. TITLE ~~~*** NAJEEB FILES RENAME ***~~~
  3. COLOR 1B
  4. Mode con cols=75 lines=12
  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 (Type COM.ini)
  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. cls
  38. call %input%
  39. ECHO.
  40. pause:
  41. goto home
  42. ::============================Extension==============================
  43. :ext
  44. set /p input= Original File Type Change Extension Only =
  45. set /p input2= Type Change Extension Only =
  46. ren *.%input% *.%input2%
  47. Pause:
  48. goto home
  49. ::============================Rename==============================
  50. :ren
  51. set /p start=Please Enter The Starting Control Number:
  52. set /p ALP=Please Enter Alphabet :
  53. set /p EXT=Please Enter Extension :
  54. setlocal enableDelayedExpansion
  55.  
  56. for /r %%g in (*.%EXT%) do (call :RenameIt %%g)
  57. goto :eof
  58. goto :exit
  59.  
  60. :RenameIt
  61. echo Renaming "%~nx1" to !start!%~x1
  62. ren "%~nx1" %ALP%!start!%~x1
  63. set /a start+=1
  64. goto :eof
  65.  
  66. :exit
  67. exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement