Najeebsk

TEXT READER.bat

Nov 15th, 2021 (edited)
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.21 KB | None | 0 0
  1. @ECHO OFF
  2. TITLE   ~~~***NAJEEB SHAH KHAN TEXT READER***~~~
  3. ::============================Home===================================
  4. COLOR 1B
  5. ECHO                  ~~~*** NAJEEB SHAH KHAN TEXT READER***~~~
  6. ECHO                           %TIME%  %DATE%
  7. ECHO  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  8. ECHO    FILES READING EXTENSION:-TXT,PNG,JPG,MF,DOC,LOG,INI,LST,SMF,ORG,
  9. ECHO    RTF,SAM,ANS,LTX,DSC,ME,SIG,LIS,QBL,HS,WTT,LUF,ATY,RAD,KNT,TM,FDR,
  10. ECHO  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  11. ECHO.
  12. set /P File2Read=ENTER FILE NAME WITH EXTENSION:
  13. If Not Exist "%File2Read%" (Goto :Error)
  14. rem This will read a file into an array of variables and populate it
  15. setlocal EnableExtensions EnableDelayedExpansion
  16. for /f "delims=" %%a in ('Type "%File2Read%"') do (
  17.     set /a count+=1
  18.     set "Line[!count!]=%%a"
  19. )
  20. rem Display array elements
  21. For /L %%i in (1,1,%Count%) do (
  22.     echo !Line[%%i]!
  23. )
  24. pause>nul
  25. CLS
  26. start "" "%~f0"
  27. exit
  28. ::***************************************************
  29. :Error
  30. cls & Color 4C
  31. echo(
  32. echo   The file "%File2Read%" dos not exist !
  33. Pause>nul
  34. exit /b
  35. ::***************************************************
  36.  
Add Comment
Please, Sign In to add comment