Advertisement
Najeebsk

REN-DEL-FIN-CMD.bat

Apr 20th, 2023
1,057
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.52 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.  
  10. =-=-
  11. ECHO.
  12. echo                 0) Najeeb Commands
  13. echo                 1) File Extension Change
  14. echo                 2) File Rename Numerical Numbers
  15. echo                 3) Delete Lines That Contains Word
  16. echo                 4) Find Lines That Contains Word Save
  17. echo.
  18. set /p web=TYPE OPTION:
  19. if "%web%"=="0" goto nsk
  20. if "%web%"=="1" goto ext
  21. if "%web%"=="2" goto ren
  22. if "%web%"=="3" goto tex
  23. if "%web%"=="4" goto fin
  24. pause:
  25. set /p MT= Type GO TO Here:
  26. Pause:
  27. CALL GOTO %MT%
  28. ::============================NSK
  29.  
  30. COMMANDS==============================
  31. :nsk
  32. cls
  33. ECHO                  ~~~*** NAJEEB SHAH KHAN CMD COMMANDS***~~~
  34. echo                           %TIME%  %DATE%
  35. echo  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  36.  
  37. =-=-=-=-
  38. ECHO    ~**Most Commonly Used Internal and External DOS Commands
  39.  
  40. Exmple**~
  41. ECHO.
  42. Echo    TYPE:COMMANDS (Type COM.ini)
  43. Echo    ATTRIB,CALL,CD,COPY,CLS,CLIP,DATE,DEL,DIR,EDIT,
  44. Echo    ERASE,EXIT,FIND,FINDSTR,FOR,FORMAT,HELP,IF,
  45. Echo    MD,MKDIR,MOVE,PATH,PAUSE,RD,RMDIR,REN,RENAME,
  46. Echo    SET,SORT,TIME,TREE,TYPE,UNDELETE,VER,VOL,WMIC
  47. ECHO.
  48. set /P "input=Command: "
  49. cls
  50. call %input%
  51. ECHO.
  52. pause:
  53. goto home
  54. ::============================Extension=======================
  55. :ext
  56. set /p input= Original File Type Change Extension Only =
  57. set /p input2= Type Change Extension Only =
  58. ren *.%input% *.%input2%
  59. Pause:
  60. goto home
  61. ::============================Rename========================
  62. :ren
  63. set /p start=Please Enter The Starting Control Number:
  64. set /p ALP=Please Enter Alphabet :
  65. set /p EXT=Please Enter Extension :
  66. setlocal enableDelayedExpansion
  67.  
  68. for /r %%g in (*.%EXT%) do (call :RenameIt %%g)
  69. goto :eof
  70. goto :exit
  71.  
  72. :RenameIt
  73. echo Renaming "%~nx1" to !start!%~x1
  74. ren "%~nx1" %ALP%!start!%~x1
  75. set /a start+=1
  76. goto :eof
  77.  
  78. :exit
  79. exit /b
  80. ::=========================Delete Word======================
  81. :tex      
  82. SET /P TEXT= ENTER WORD REMOVE :
  83. SET /P FILE= ENTER FILE NAME :
  84. FindStr /V "%TEXT%" %FILE%>OUTPUT.txt
  85. PAUSE :
  86. START OUTPUT.txt
  87. goto home
  88. ::=========================Find Save Word====================
  89. :fin
  90. SET /P TEXT= ENTER WORD FIND :
  91. SET /P FILE= ENTER FILE NAME :
  92. FindStr  "%TEXT%" %FILE%>OUTPUT.txt
  93. PAUSE :
  94. START OUTPUT.txt
  95. goto home
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement