WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.



Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Progress bar during HTTP download

Keywords:   Progress bar during HTTP download


How can I display a progress meter during HTTP file download?

I can pass the approximate file size if required

FTP transfers are not possible in this scenario.

I have code that will launch Internet Explorer to download the file, and close the "Download Complete" dialog upon completion. I am looking for a cleaner solution.


Sorry. No joy. No supported progress bar, although I do know that someone made one by using the WinInet extender. They used the iReadDataBuf function to download bits of it at a time so thay could update some progress bar as they went along. Could possibly use the aStatusBar function in the ShellOperations extender or use one of the "box" type progress bars.

The following uses the wininet api, shows a progress bar etc..., needs the filesize.

The code uses a function to remove the file from the cache because it was not deleted after the download, maybe it can be fixed setting some parameter in a api function, you can get rid of that part and focus only in the download process, it is simple, uses to buffers, downloads data in packets of 10000 bytes and transfer the data between buffers.

We suggest you invalidate the delete part just for security, since the function deletes in recursive mode

The script is commented and read the txt file.

Article ID:   W15098
File Created: 2017:08:29:11:37:11
Last Updated: 2017:08:29:11:37:11