0 votes
by (120 points)
edited

hi....

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.

Thanks

1 Answer

0 votes
by (134k points)
edited

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)

...