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.

iFtpFindInit Returns Zero

 Keywords:  

Question:

I have a script (compiled) was working just fine till a couple of days ago. All of a sudden the iFtpFindInit refuses to return a handle (value returned is 0) and hence my script grinds to a halt. The same script works fine on other machines.

I can connect just fine (and retrieve file listings) from the command line. Even the CurrDir returns the expected values if I display it after its assigned.

Running WB 2001N on WinNT 4.0 Server SP5. WinInet Extender version was 25055 and the WININET version was 1.2

Any clues?

AddExtender("wwint34i.dll")

TopHandle=iBegin(0,"","")
ConHandle=iHostConnect(TopHandle,Server,@FTPPASSIVE, UserId,Pswd)
if ConHandle==0
   Message("ERROR","Unable to connect to host")
   exit
endif


CurrDir=iFtpDirGet(ConHandle)

Init=iFtpFindInit(ConHandle,Src ,"*",@False,@False)
CurrDir=iFtpDirGet(ConHandle)
SrcLen=StrLen(CurrDir)
if Init==0
        Message("IFtpFindInit?","Failed")
        iClose(ConHandle)
        iClose(TopHandle)
        Goto Done
endif

Answer:

Not Sure. Any recent changes to your system or the FTP server?

User Response:

Problem solved!

I had to switchover from Passive FTP to "regular" FTP due to the firewall rules being recently changed.

ConHandle=iHostConnect(TopHandle,Server,@FTP, UserId,Pswd) 

Article ID:   W14806
File Created: 2004:01:16:08:40:34
Last Updated: 2004:01:16:08:40:34