在不知道该文件的扩展名的情况下读取文件。 [英] Reading A File Without knowing an extension of that File.

查看:113
本文介绍了在不知道该文件的扩展名的情况下读取文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从印度遥感卫星数据生成8mb大小的文件。

文件的名称类似于 0fy23jl.0fm 并有一个像 .0fm,.0fl,.0fn等的扩展......



现在我的问题是我无法在Vb.net 2008中阅读该文件的内容。

i尝试VB.Net中所有文件编程方法。



但是我不能只阅读那个特定的文件..

使用所有其他文件概念我可以读取只有扩展名为.txt的文件。 />


请帮我看看这个文件。



感谢提前

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 Vb.net 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

推荐答案

没有像文件扩展名这样的想法。



我知道很多人不同意。 等待!在文件名中,如?????。ext,ext和.ext都不是扩展名。在DOS中有这样的概念,但最终,在较新的文件系统中,这种概念被放弃了。即使Windows Shell以特殊方式(表示文件类型)在最后一个'''之后处理名称的一部分,但从文件系统的角度来看,没有这样的东西。



因此,要打开文件,您需要知道文件名,句点。全部。



即使你可以做其他事情,也会有什么用处。如果你有两个符合某种命名模式的文件,你仍然需要告诉系统究竟要使用什么。但是你确切地知道文件的名称,扩展并不重要。只需使用简单的逻辑。



-SA
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.

—SA


如果您在法律上有权获得文件中的数据,请联系公司首先创建了文件,并要求他们提供sdk或其他类似的东西,这样你就可以访问该文件了。

该文件可能在二进制文件中专有的序列化对象。除非你知道它们以及文件的布局以及如何阅读它,否则除了阅读单个字节之外,你几乎不运气。
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.


这篇关于在不知道该文件的扩展名的情况下读取文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆