Get icons at FTP Site

0 votes
asked May 28, 2012 by rahul (120 points)
edited May 28, 2012


I am making FTP using rebex. I want to know that is there any way to get Icons of files and folders which are on FTP Site to show at local machine.


1 Answer

0 votes
answered May 28, 2012 by Lukas Pokorny (128,250 points)
edited May 28, 2012

The FTP protocol doesn't recognize a concept of file or folder icons at all, which means you will have to come up with a way to retrieve the suitable icons yourself. The recommended way is to use the remote file's extension to get an icon associated with that file type on the local machine.

The following articles and/or sample code might help:

Get Registered File Types and Their Associated Icons in C# (CodeProject)

How to use the SHGetFileInfo function to get the icons associated with files in C# (Microsoft Support)

How do I get common file type icons in C#? (Stack Overflow)