The remote ftp host was a Win NT.By default it gives a DOS like listing of the files. 
I guess the default parser dosen't  work quite  well with DOS like listings. So I 
issued a SITE command to get UNIX like listings and bingo!!!...that worked. I am 
wondering if there are parsers available that would function in a more generic manner.

Regards,
Vijay.

--- "Daniel F. Savarese" <[EMAIL PROTECTED]> wrote:
>
>In message <[EMAIL PROTECTED]>, vijay k v writes:
>>Then i do ..
>>FTPFile ftpFile[] = ftp.listFiles();
>>
>>But when i do..
>>System.out.println(ftpFile.length);
>>
>>I get a java.lang.NullPointerException
>
>http://jakarta.apache.org/commons/net/apidocs/org/apache/commons/net/ftp/FTPClient.html#listFiles()
>
>Returns:
>    The list of file information contained in the current working directory.
>==> null if the list could not be obtained or if there are no files in the
>    directory.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

_____________________________________________________________
Thank you for choosing LinuxQuestions.
http://www.linuxquestions.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to