I am working with wget here. What I want to do is fetch the links as I paste in cmd so that it makes it easy for me not to re-write each line with the links I want wget to fetch.
The common/simple code (in batch) for fetching a website link data is "wget "http://example.com/example" --no-check-certificate"
or "wget http://example.com/example --no-check-certificate"
(both works in .bat),
but I want it to be something like "wget %paste --no-check-certificate"
so that if I paste the link say https://google.com in the command prompt it directly runs is as "wget "https://google.com" --no-check-certificate"
.
How do I achieve it?
I have tried the normal batch file scripting with the code wget "http://example.com/example" --no-check-certificate, nothing else.
This code works flawlessly in the .bat file:
wget "http://example.com/example" --no-check-certificate
I explain my query in simple steps:
wget http://example.com/example --no-check-certificate
where http://example.com/example is the link I pasted in cmd. Execute the following batch script.
@echo off
:loop
set /p "link=Paste Link "
wget "%link%" --no-check-certificate
goto :loop
set /p
is intended for user input. It also accepts a "paste".