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.

TechHome

WinInet
plus

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

Dialog Progress Bar not Working

Keywords: 	 iFTPDialog iFTPGet

Question:

I'm using iFTPDialog with option 2 (let extender handle the dialog), and iFTPGet on a single file that is around 2 MB. The file takes around 2 minutes to download, but the progress bar immediately displays 100% complete. What am I doing wrong?

Answer:

In the iFTPDialog function, if you specify option 2 (extender handles the dialog), AND in the iFTPGet function, if you specify 0 (zero) for the file size. The iFtpDialog does its best to handle the progress bar, by attempting to get the filesize from the FTP server.

NOTE:
The remote file name you specify in iFtpGet can be Case-Sensitive !!

It is important that you specify the proper case for the "filename" in the iFtpGet function. Some FTP servers will not return viable filesize information to the automatic iFtpDialog (if case is wrong), therefore the automatic progress bar is not able to properly update.

If you do all this, then the progress thermometer should work fine.

If you want to get a wildcarded list of all files on the server, and then go through the list with an iFtpGet or iFtpPut, do not specify the wildcarded filenames in iFtpGet or iFtpPut. Those functions only take a single file name. You CAN specify the wildcarded filenames in iFtpFindInit, and then run through each of the files with iFtpFindNext. To see a working example of this, see the Ftp example "MULTI_GET_MANUAL" in the help file.

You can also see in that example how we go through the file list until iFtpFindNext returns a blank string, accumulating filename and filesize information as we go. The filesize is extracted out from the iFtpFindNext string information, and you can specify that value in the fourth parameter of iFtpGet if need be.


Article ID:   W12593
Filename:   Dialog Progress Bar not Working.txt
File Created: 2017:07:28:12:58:45
Last Updated: 2003:09:19:07:21:35