windows “description.ion”文件规范?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1810398/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 13:30:09  来源:igfitidea点击:

"descript.ion" file spec?

windowsfilespecifications

提问by DVK

There appears to be a somewhat standard "descript.ion" file in Windows programs universe which provides meta data for all/some of the files in a given directory.

Windows 程序世界中似乎有一个标准的“descript.ion”文件,它为给定目录中的所有/部分文件提供元数据。

I know there are various programs which write this file (example: NewsBin, UseNet downloader) and read it (Example: "FAR", a file manager mimicking old Norton Commander).

我知道有多种程序可以编写此文件(例如:NewsBin、UseNet 下载器)并读取它(例如:“FAR”,一个模仿旧 Norton Commander 的文件管理器)。

I'm writing my own file indexer, and would like to add the ability to parse and use the info from "descript.ion" files.

我正在编写自己的文件索引器,并希望添加解析和使用“descript.ion”文件信息的能力。

The problem I have is that I have not been able to find an actual spec for the file, despine much googling.

我遇到的问题是我无法找到该文件的实际规范,因此无法进行大量的谷歌搜索。

I reverse engineered it as best I could, but I'm not certain whether I captured 100% of the possible details, so I figured I'd ask SO.

我尽我所能对其进行了逆向工程,但我不确定我是否捕获了 100% 的可能细节,所以我想我会问。

Here are example lines from the file:

以下是文件中的示例行:

"Rus Song1.mp3" SovietMus 1/2, [email protected], Fri Aug 08 00:46:27 2008
RusSong2.mp3 SovietMus 2/2, [email protected], Fri Aug 08 01:46:22 2008

As it seems the structure is:

看起来结构是:

  1. First "token" is a file name.

    • If the token starts with any letter but double quote, the token ends at the first spacecharacter.

    • If the token starts with the double quote, the end of token is the following double quote

    • Not sure what happens if filename contains a double quote, IIRC it's illegal in Windows filesystems, so escaping the quote may be a moot question)

  2. Last token (end of line to the very last comma moving backwards) is a timestamp.

  3. Second to last token (the very last comma to second-to-last comma moving backwards) is the name of the poster from the Usenet newsgroup. I'm not quite sure what happens in generic format since the only descript.ion files I saw were from NewsBin that is obviously Usenet centric.

  4. Everything in between is a description, in NewsBin's case coming from post's subject.

  1. 第一个“令牌”是文件名。

    • 如果标记以除双引号以外的任何字母开头,则标记以第一个space字符结束。

    • 如果令牌以双引号开头,则令牌的结尾是以下双引号

    • 不确定如果文件名包含双引号会发生什么,IIRC 在 Windows 文件系统中这是非法的,所以转义引号可能是一个没有实际意义的问题)

  2. 最后一个标记(最后一个逗号的行尾向后移动)是一个时间戳。

  3. 倒数第二个标记(倒数第二个逗号的最后一个逗号向后移动)是来自 Usenet 新闻组的发布者的名称。我不太确定通用格式会发生什么,因为我看到的唯一 descript.ion 文件来自 NewsBin,显然以 Usenet 为中心。

  4. 中间的所有内容都是描述,在 NewsBin 的案例中来自帖子的主题。

QUESTIONs:

问题

  • Does anyone know of a bit more official "descript.ion" file spec/documentation? (or, at elast, have your own knowledge of those files and can verify my spec)

  • Does anyone know of any other programs that read or write this file?

  • 有谁知道更官方的“descript.ion”文件规范/文档?(或者,至少,您对这些文件有自己的了解,并且可以验证我的规范)

  • 有谁知道读取或写入此文件的任何其他程序?

Thanks!

谢谢!

采纳答案by Joe

The original usage of DESCRIPT.ION was to provide longer more descriptive names to 8.3 filenames; all it had was the shortname and a longer description. As you've found, others have co-opted the name with varying formats and usages. Frankly speaking, I don't think you'll find any specific commonality among the various usages.

DESCRIPT.ION 的最初用途是为 8.3 文件名提供更长的更具描述性的名称;它所拥有的只是短名称和更长的描述。正如您所发现的,其他人已经选择了具有不同格式和用法的名称。坦率地说,我认为您不会在各种用法之间找到任何特定的共性。

回答by ErikWeitenberg

The description files on my system are from Total Commander as well. They follow the basic spec mentioned in the other answers:

我系统上的描述文件也来自 Total Commander。他们遵循其他答案中提到的基本规范:

Filename Text I typed to describe the file
"Long filename" Some text

Each line ends in a normal Windows line break.

每行都以正常的 Windows 换行符结尾。

In addition, the program stores multi-line comments as follows:

另外,程序存储多行注释如下:

Filename This is the first line\nSecond line\nLast line\x04\xc2

Here, I mean that the descript.ion file contains a backslash and a letter 'n' where I typed a line break, and two special characters 04 C2at the end of the comment. In addition, the line is ended by a Windows line break 0D 0A.

在这里,我的意思是 descript.ion 文件包含一个反斜杠和一个字母“n”,我在其中输入了一个换行符,以及04 C2注释末尾的两个特殊字符。此外,该行以 Windows 换行符结束0D 0A

Apparently, the two extra characters at the end of the line signal the end of a multiline comment. If I remove them, the comment is rendered as a single line in the GUI, and the '\n' sequences are displayed literally.

显然,行尾的两个额外字符表示多行注释的结束。如果我删除它们,注释将在 GUI 中呈现为一行,并且 '\n' 序列按字面显示。

回答by Guest

Format is simple: FileName remainder of the line is a description of the file

格式很简单:FileName 行的其余部分是文件的描述

https://jpsoft.com/ascii/descfile.txt

https://jpsoft.com/ascii/descfile.txt

(Wayback Machine)

(回归机器)

回答by c33s

the answer above looks correct for me, just a addition:

上面的答案对我来说是正确的,只是补充:

from http://filext.com/file-extension/IONThe ION file type is primarily associated with '4DOS'. Note: Norton Utilities also uses 4DOS.

来自http://fileext.com/file-extension/IONION 文件类型主要与“4DOS”相关。注意:Norton Utilities 也使用 4DOS。

http://www.optimasc.com/products/fileid/4dos-descext.pdf

http://www.optimasc.com/products/fileid/4dos-descext.pdf

Collected links to 4DOS description-aware programs of all kind and 4DOS tools. http://www.4dos.info/4tools.htm

收集到所有类型的 4DOS 描述感知程序和 4DOS 工具的链接。 http://www.4dos.info/4tools.htm

http://drupal.org/node/289988

http://drupal.org/node/289988

回答by mk2237

The descript.ionfile is extensively used in the file management utility "total commander", a shareware found in www.ghisler.com. From version 7.5 of TC, it can have length of 4096 bytes. I have been using it extensively to annotate my files without any issues. You may look up different user's experience at the total commander users forum.

descript.ion文件广泛用于文件管理实用程序“总指挥官”,这是一个在 www.ghisler.com 上找到的共享软件。从 TC 的 7.5 版开始,它的长度可以为 4096 字节。我一直在广泛使用它来注释我的文件,没有任何问题。您可以在总指挥官用户论坛上查看不同的用户体验。