Advertisement
JJQJ3JH

Untitled

Jan 26th, 2024
70
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.36 KB | Software | 0 0
  1. @echo off
  2. Title CurlLink 1.0.0 Test Build 1432
  3. setlocal EnableDelayedExpansion
  4.  
  5. where curl > NUL
  6. if %errorlevel% neq 0 (
  7. echo Curl not downloaded!
  8. curl -L -o curl.exe httpsNO LINKScurl.se/windows/dl-7.79.1/curl-7.79.1_2-win64-mingw.zip
  9. exit
  10. )
  11.  
  12. :menu
  13. cls
  14. echo CurlLink 1.0
  15. echo Main menu:
  16. echo 1.Download
  17. echo 2.Information
  18. echo 3.Help
  19. set /p choice=Choose function
  20.  
  21. if %choice% equ 1 (
  22.  
  23. cls
  24. set /p url=Input URL-Adress:
  25.  
  26. set counter=0
  27.  
  28. for /f "tokens=*" %%i in ('curl -s %url%') do (
  29. set content=!content!%%i
  30. )
  31.  
  32. for /f "tokens=2 delims=<> " %%i in ("%content%") do (
  33. if "%%i"=="href" (
  34. set /a counter+=1
  35. set link[!counter!]=%%j
  36. )
  37. )
  38. if %counter% EQU 0 (
  39. echo Files not finded
  40. pause
  41. exit
  42. )
  43. echo List of files:
  44. for /l %%i in (1, 1, %counter%) do (
  45. echo %%i. !link[%%i]!
  46. )
  47.  
  48. set /p num=Choose number of file to download:
  49.  
  50. set download_url=%url%!link[%num%]!
  51.  
  52. curl -O %download_url%
  53.  
  54. echo File downloaded.
  55.  
  56. pause
  57. ) else if %choice% equ 2 (
  58. echo Version 1.0.0 Test Build 1432
  59. echo Made by Painkiller413
  60. echo Country of official production: Kazakhstan
  61. echo Thanks for download CurlLink!
  62. echo Maded on Batchfile
  63. echo This is a test version.
  64. ) else if %choice% equ 3 (
  65. echo Choose 1 if you want download a file
  66. echo Choose 2 if you want know information of this program
  67. ) else (
  68. echo incorrect choose.
  69. pause
  70. goto menu
  71. )
  72.  
  73. pause
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement