Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"descript.ion" file spec?

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.

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

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

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.

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 space character.

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

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?

Thanks!

like image 723
DVK Avatar asked Nov 27 '09 19:11

DVK


2 Answers

The descript.ion file 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.

like image 118
mk2237 Avatar answered Nov 15 '22 15:11

mk2237


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

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

Each line ends in a normal Windows line break.

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 C2 at the end of the comment. In addition, the line is ended by a Windows line break 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.

like image 42
EriekeWeitenberg Avatar answered Nov 15 '22 16:11

EriekeWeitenberg