Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @shift /0
- @ECHO OFF
- TITLE ~~~*** NAJEEB FILES CREATE RENAME AND MORE ***~~~
- COLOR 1B
- setlocal enabledelayedexpansion
- Mode con cols=75 lines=18
- :home
- ECHO ~~~*** NAJEEB SHAH KHAN FILES COMMANDS ***~~~
- ECHO %TIME% %DATE%
- ECHO -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ECHO.
- echo 0) Najeeb Commands
- echo 1) File Extension Change
- echo 2) File Rename Numerical Numbers
- echo 3) Delete Lines That Contains Word
- echo 4) Find Lines That Contains Word Save
- echo 5) Create Multiple Folders
- echo 6) Create Multiple Files
- echo 7) Create Number List Files
- echo.
- set /p web=TYPE OPTION:
- if "%web%"=="0" goto nsk
- if "%web%"=="1" goto ext
- if "%web%"=="2" goto ren
- if "%web%"=="3" goto tex
- if "%web%"=="4" goto fin
- if "%web%"=="5" goto fol
- if "%web%"=="6" goto fil
- if "%web%"=="7" goto lis
- pause:
- set /p MT= Type GO TO Here:
- Pause:
- CALL GOTO %MT%
- ::============================NSK COMMANDS==============================
- :nsk
- cls
- ECHO ~~~*** NAJEEB SHAH KHAN CMD COMMANDS***~~~
- echo %TIME% %DATE%
- echo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ECHO ~**Most Commonly Used Internal and External DOS Commands Exmple**~
- ECHO.
- Echo TYPE:COMMANDS (Type COM.ini)
- Echo ATTRIB,CALL,CD,COPY,CLS,CLIP,DATE,DEL,DIR,EDIT,
- Echo ERASE,EXIT,FIND,FINDSTR,FOR,FORMAT,HELP,IF,
- Echo MD,MKDIR,MOVE,PATH,PAUSE,RD,RMDIR,REN,RENAME,
- Echo SET,SORT,TIME,TREE,TYPE,UNDELETE,VER,VOL,WMIC
- ECHO.
- set /P "input=Command: "
- cls
- call %input%
- ECHO.
- pause:
- goto home
- ::============================Extension=======================
- :ext
- set /p input= Original File Type Change Extension Only =
- set /p input2= Type Change Extension Only =
- ren *.%input% *.%input2%
- Pause:
- goto home
- ::============================Rename========================
- :ren
- set /p start=Please Enter The Starting Control Number:
- set /p ALP=Please Enter Alphabet :
- set /p EXT=Please Enter Extension :
- setlocal enableDelayedExpansion
- for /r %%g in (*.%EXT%) do (call :RenameIt %%g)
- goto :eof
- goto :exit
- :RenameIt
- echo Renaming "%~nx1" to !start!%~x1
- ren "%~nx1" %ALP%!start!%~x1
- set /a start+=1
- goto :eof
- :exit
- exit /b
- ::=========================Delete Word======================
- :tex
- SET /P TEXT= ENTER WORD REMOVE :
- SET /P FILE= ENTER FILE NAME :
- FindStr /V "%TEXT%" %FILE%>OUTPUT.txt
- PAUSE :
- START OUTPUT.txt
- goto home
- ::=========================Find Save Word====================
- :fin
- SET /P TEXT= ENTER WORD FIND :
- SET /P FILE= ENTER FILE NAME :
- FindStr "%TEXT%" %FILE%>OUTPUT.txt
- PAUSE :
- START OUTPUT.txt
- goto home
- ::===================Create Multiple Folders=====================
- :fol
- set /P "text=Enter A Folder Name: "
- :PromptNumber
- set /P "number=How Many Create Folders Number: "
- set /A N=number 2>nul
- if %N% LSS 1 goto PrintError
- if %N% GTR 99 goto PrintError
- echo/
- for /L %%g in (1,1,%N%) do (md %text%-%%g)
- echo/
- pause
- goto :EOF
- :PrintError
- echo/
- echo Check your number which must be between 1 and 100.
- echo/
- goto PromptNumber
- goto home
- ::======================Create Multiple Files====================
- :fil
- set /P "text=Enter A File Name: "
- :PromptNumber
- set /P "number=How Many Create Files Number: "
- set /A N=number 2>nul
- if %N% LSS 1 goto PrintError
- if %N% GTR 99 goto PrintError
- echo/
- for /L %%I in (1,1,%N%) do echo Create "%text%-%%I.txt" 2>"%text%-%%I.txt"
- echo/
- pause
- goto :EOF
- :PrintError
- echo/
- echo Check your number which must be between 1 and 100.
- echo/
- goto PromptNumber
- goto home
- ::===================Create Number List Files===================
- :lis
- SET /P uname=Please Enter (File Name Or Path Or Word):
- SET /P ext=Please Enter Extension:
- SET /P count=How Many Lines Number:
- FOR /L %%G IN (1,1,%count%) DO ECHO %uname%%%G.%ext% >>File-List.txt
- IF "%uname%"=="" GOTO Error
- pause
- GOTO End
- :Error
- ECHO You did not enter your name! Bye bye!!
- goto home
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement