Getting a list of file types

  • Thread starter Thread starter JD
  • Start date Start date
J

JD

Hi all,

Can anyone tell me is there a way to get a list of file types either
supported on the server or clients computer and bind it to a drop down list
in C#

Thanks

Jonathan Dixon
 
Define "supported."

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
Well what i think i mean is if you open a browser window and click tools,
folder options then File Types it shows a list of files , is there a way to
get the file extentions into a drop down list.

Regards
 
I don't know of any API to do it but you could look in the registry

the problem is that there will be hundreds of registered file types, most of
which willl be of no interest to a user of the app
 
First of all, I opened my Internet Explorer, and for the life of me I
couldn't find "Folder Options" under Tools, or anywhere else. Now, if you
open My Computer or Windows Explorer, you can certainly get a list of File
Types that are recognized by the local Operating System. This comes from the
machine's System Registry, and is used by the local Operating System to
automatically recognize what software is needed to work with the various
File types.

While it would certainly be possible to write server-side code that accesses
the System registry on the server machine, and return all of the data store
in there about the various file types recognized by the server's OS, I can't
for the life of me figure out what use that would be to you or anyone else.
It is a local machine thing, not even a LAN thing. Putting it into a
drop-down list on a remote client's browser seems rather silly.

May I ask what the purpose of this would be?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

JD said:
Well what i think i mean is if you open a browser window and click tools,
folder options then File Types it shows a list of files , is there a way to
get the file extentions into a drop down list.

Regards


Define "supported."
 
Perhaps if you could tell us what business requirement you're trying to
fulfill, we can provide you with some realistic suggestions as to how to
implement a solution.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
The reason i need a list of files is for a file manager to run internally on
a network.

The idea being you create a rul selecting from a drop down list the type of
file and create a rule as to where on the server these files are to be
stored.

e.g

when a user logs on they can try and upload a file, if the extention has a
rule it will send the uploaded file to a directory on the server if not the
user is forwarded to page which has a dropdown list of file types, they then
select the type of file they wish to upload and the directory on the server
they wish to save the uploaded file to, next time the user want to upload a
file with the same extention it goes straight to the folder it was assigned
to when creating the rule.

An example of a rule would be

..gif is uploaded to C:\filemanager\images
..mdb is uploaded to C:\filemanager\AccessDatabases.

If you require furthere clarification please dont hesitate to ask.

It is just a simple solution to make storing files more simple and easy to
navigate to the file type you are looking for.

Regards

Jonathan Dixon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top