FTP Question
Posted: Tue Sep 13, 2011 9:28 pm
Trying to learn the PB FTP commands a few at a time and having an issue with the following (highly modified sample program) code:
Output in the Debug window is just the two Debug print statements - the current directory and the 'Remote directory listing is as follows:' ones. The Directory listing itself from within the if-while loop doesn't show anything. I would also note that the while-if loop is from one of the documentation samples.
What am I doing wrong???
Tnx.
Tom
Code: Select all
InitNetwork()
If OpenFTP(0, "server", "userID", "password", 0)
SetFTPDirectory(0, "/interface")
SetFTPDirectory(0, "ftp")
SetFTPDirectory(0, "prod")
CurrDir$ = GetFTPDirectory(0)
Debug "Current directory on remote server is " + CurrDir$
Debug "Remote directory listing is as follows:"
If ExamineFTPDirectory(0)
While NextFTPDirectoryEntry(0)
Debug FTPDirectoryEntryName(0)
Wend
EndIf
CloseFTP(0)
Else
MessageRequester("Error", "Can't connect to the FTP server")
EndIf
What am I doing wrong???
Tnx.
Tom