Click here to Skip to main content
13,139,520 members (52,533 online)
Rate this:
Please Sign up or sign in to vote.
I have a File having 8mb size generating from Indian Remote Sensing Satellite data.
The Name of the file is something like " 0fy23jl.0fm" and having a Extension like .0fm , .0fl , .0fn etc....

Now my Problem is that i can't read the content of that file in 2008.
i try all the method of file programing in VB.Net.

but i cant read that particular file only..
using all other file concept i can get read the file only having a extension of ".txt".

Please help me to read this file.

Thank in Advance
Posted 6-Feb-13 7:02am
Updated 6-Feb-13 7:03am
Zoltán Zörgő 6-Feb-13 13:07pm
Please clarify: file extension does not matter at all form when opening file in Please supply relevant code. What is the exact error message you get, while you try to read the file?
Vishal Makwana 6-Feb-13 13:20pm
No Error Message will occur.
but system get not responding..

my coding is here..


ofd1 = New OpenFileDialog

Dim file_name As String = ""
Dim file_name, file_content As String
Dim i As Int32

ofd1.Filter = "All Supported File |*.txt;*.0fm;*0fl;*0fn"
ofd1.Title = "Browse Files"

If ofd1.ShowDialog = Windows.Forms.DialogResult.OK Then

file_name = ofd1.FileName

Dim fs As New FileStream(file_name, FileMode.Open)
Dim byt(fs.Length - 1) As Byte
fs.Read(byt, 0, byt.Length)

fs = Nothing

For i = 0 To byt.GetUpperBound(0)
file_name = file_name & Chr(byt(i))

richtext.Text = file_name

End If
Catch ex As Exception

MessageBox.Show("File Not Found" & ex.Message)

End Try
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

There is no such think as "file extension".

I know that many will disagree. Hold on! In the file name like "?????.ext", neither "ext" nor ".ext" is extension. There was such notion in DOS, but eventually, in newer file systems, such notion was abandoned. Even though Windows Shell treats the part of the name after last '.' in a special way (to indicate "file type"), from the standpoint of the file system, there is no such thing.

Therefore, to open a file, you need to know the file name, period. All of it.

Even if you could do something else, what would be the use. If you have, say, two files which meet certain naming pattern, you still have to tell the system what exactly to use. But is you know the name of the file exactly, "extension" just does not matter. Just use the simple logic.

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If you are legally entitled to the data in the file, contact the company which has created the files in the first place and ask them for an sdk or something of that nature which will give you access to the file as you want.
The file is likely in a binary file of proprietary serialized objects. Unless you know them and the layout of the file and how to read that, you are pretty much out of luck other than reading the individual bytes.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 6 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100