469,574 Members | 1,662 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,574 developers. It's quick & easy.

Re: Distinguish file and folder on ftp site

Mailing List SVR wrote:
is there a simple way to do this?

ftplib seems unable to distinguish between files and dir, a mimetype
check would be good,
the FTP protocol doesn't specify the format for the output from the LIST
command, so you have to use some heuristics; see e.g. the code in


or use a wrapper for Dan Bernstein's ftpparse library (requires a C


Not sure what you mean by "mimetype"; that has nothing to do with
directories vs. files, afaik.


Aug 14 '08 #1
0 704

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.