Groups | Blog | Home
all groups > dotnet faqs > march 2006 >

dotnet faqs : Identify a file type and open the file


Shilpa
3/21/2006 9:22:31 PM
Hi All,

I want to write C# code to identify a file type and open the file in
the associated editor.
For example, text files should be identified and opened in notepad,
html should be opened in internet explorer/netscape/mozilla.
At design time, I do not know if internet explorer/netscape is
installed on the client machine. The C# code should identify that and
open.


Please help.


Regards,
Shilpa
Brendan Green
3/23/2006 12:00:00 AM
If you just execute the file via System.Diagnostics.Process.Start(...) it'll
be opened with whatever program is associated with the extension.
[quoted text, click to view]

AddThis Social Bookmark Button