Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


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 iFtpInit, 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