Loading ...

custom file extension?

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  getting started / general asp.net   » custom file extension?

custom file extension?

Posts under the topic: custom file extension?

Posted: 10/22/2010

Contributor 2237  points  Contributor
  • Joined on: 9/24/2009
  • Posts: 172

Hello Experts,

Can anyone tell me how I can create my own file extension?

 

Thanks in advance.


Posted: 10/22/2010

Professional 8505  points  Professional
  • Joined on: 5/3/2010
  • Posts: 391
  Answered

mohit said:

user="mohit kumar"]

Hello Experts,

Can anyone tell me how I can create my own file extension?

 

Thanks in advance.

Hi Mohit,

Please be more specific.

Do you want to create file extension or file format?

File extensions are not something that defines what the file contain. As you already know, you may have .txt file and change its extension to .exe, so it will be an exe file :).

So, you can simply create file mohit.txt and change its extension to mohit.moh - so that its your extension.

As per the file format, the file can be plain text or binary, so you define the format on the way you want to be readable, something like you define the standards. The files we know (.txt, .exe, .rar, .jpg..etc) are all standardized as they are.

For example, in one project in my Master studies, I've created a program that has its own SCRIPT (for more flexibility with interaction), therefor, the script has had it own format which the program was parsing it in order to execute it. After that, I've added feature where user can save the written script on a script file with extension .hs - The program rules were that you must have file with such extension if you want to load it tru the Open -> Load Script feature ;).

So, I did nothing but creating rules in my program :).

Of course, I've registered the file format in folder options (on my PC)

FOLDER OPTIONS -> File Types - and have made them to open with my program.

Hope you get this.

Regards,
Hajan


Posted: 10/23/2010

Guru 16813  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490

Mohit,

Your question is not specific what will you do with it , are you asking how to handle it in IIS ??


Posted: 10/23/2010

Guru 16813  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490
  Answered

Posted: 10/23/2010

Contributor 2237  points  Contributor
  • Joined on: 9/24/2009
  • Posts: 172

Thank you Hajan:)


Page 1 of 1 (5 items)