iFtpFindInit Returns Zero
Keywords:
This article being edited.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 endifAnswer:
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