Reply to topic
HTTP Batch File
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
I have a file on the web that is in an HTTP location and I want to write a batch file that will get that file. I can put START IEXPLORE http://addres/to/file.zip and it start fine, but the confirmation dialog box comes up waiting for user input and the batch hangs there.

Any ideas on how to accomplish the DL?
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
use FTP...
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
let me be more specific... you can write a batch script to start command line ftp and pass it a script of commands... i use it every night Wink works like a charm.
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
I know exactly what you are saying - that's how I get my webserver logs - but those are from an FTP server.
I command line into FTP - load up an FTP script and it runs then comes back to my batch and processes the logs.

But this file is a text file on an HTTP server. The location of this file is like http://www.myserver.com/textfile.txt and as such I can't pull it from FTP. Correct?
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
Why can't you? I'm confused. You can pull any type of file down via ftp...

OOOHHH okay. I think I gotcha.

Without writing/obtaining an app to do a screenscrape, i dont' think so.
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
yea - there is no FTP server on the server that the file is sitting on so using FTP is out for this instance...
I may have to write a little app to do it instead of a batch file...
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
shouldn't be too hard... you can just collect the webresponse and write it to a file... should be fairly easy...
morecraf


Joined: 22 Apr 2005
Posts: 4
Reply with quote
Why can't you just use wget or lynx -dump (both have windows ports- see cygwin) in your batch script to perform the download for you?
Both programs support ssl and basic/digest authentication schemes too- also a lot of other options.
I hope this helps.
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
Since these scripts reside on our new 2k3 installations using cygwin is a no-no and I can't say that I disagree with the server guys on this one. Cygwin is - well - ancient and there's no telling what kind of security risks you run by having it on your machine.

The solution we came up with is using a VBS.
morecraf


Joined: 22 Apr 2005
Posts: 4
Reply with quote
Well, there are wget binaries that have been compiled for windows using VC++ 6.0:
http://allserv.ugent.be/~bpuype/wget/
if your interested.
HTTP Batch File
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic