Thanks for your answer.But I just don't know if it is a file or a directory on the remote server.
what I can only get is a path, like a method like this boolean fileOrDirectroy(String ftppath), true for file, false for directory
Any suggestion will be highly appreciated