FTP file or directory
FTP file or directory
Does anyone know how to get the attributes of a file or directory on an FTP server. i.e. 1 if it's a file or 2 if it's a directory. I've tried the usual directory commands but they just crash my routine. 
Once you have logged, to have a list of files on the server, you must open a data connection (send to server the PASV command). The server replies with an IP address with 2 more bytes. The first 4 bytes are the IP and the last 2 are the port. Open this new connection and send on the previous opened connection (port 21) the command LIST. Wait and get a directory dump from the data connection. I'm doing a FTP client which doesn't use Windows FTP-API, as soon as it's finished I'll post the code.
Thanks
Seldon, You've been a great help. I look forward to your post.

