how to save response of wget.exe in a variable?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Posts: 362
Joined: 16 Jul 2013 12:00
Location: HSV

Re: how to save response of wget.exe in a variable?

#16 Post by Samir » 23 Jul 2017 15:58

sibianul wrote:Samir, after typing TYPE TEST it showed what I wanted :)

Code: Select all

C:\Users\Ovidiu>c:\"Program Files (x86)"\GnuWin32\bin\wget.exe --output-document=TEST ""
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:\Program Files (x86)\GnuWin32/etc/wgetrc
--2017-07-20 08:48:32--
Connecting to conectat.
Cerere HTTP trimisă, se aşteaptă răspuns... 200 OK
Dimensiune: 5 [text/html]
Saving to: `TEST'

100%[==============================================================================>] 5           --.-K/s   in 0s

2017-07-20 08:48:33 (181 KB/s) - `TEST' saved [5/5]

C:\Users\Ovidiu>TYPE TEST

I found the other files also, wget was saving files in my Windows User folder, and the last one was the TEST file, and it contained the response of my server, the word SLEEP :) Now what ?
penpen got it. 8)

The results were being written to these files and then you could have read in the file and put it into the variable Webresponse, but penpen used a method to get the results directly into the variable. 8) Because he's smart like that. :mrgreen: 8)

Post Reply