Descript.ion format specification?
Moderators: Hacker, petermad, Stefan2, white
Descript.ion format specification?
TC has extended the original JPSoft/4DOS descript.ion format with support for multiple lines and soem other stuff (codepages maybe?).
Where can I find the specification of this new format (/new formats in case of multiple versions)?
Where can I find the specification of this new format (/new formats in case of multiple versions)?
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Re: Descript.ion format specification?
The original format description is still available on way back machine.
#5767 Personal license
Re: Descript.ion format specification?
https://stackoverflow.com/questions/1810398/descript-ion-file-spec
2013-04-04 10:38 EriekeWeitenberg
The description files on my system are from Total Commander as well.
They follow the basic spec mentioned in the other answers:Each line ends in a normal Windows line break.Code: Select all
Filename Text I typed to describe the file "Long filename" Some text
In addition, the program stores multi-line comments as follows: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.Code: Select all
Filename This is the first line\\nSecond line\\nLast line\x04\xc2
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.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Re: Descript.ion format specification?
I've been working on AutoHotkey library for descript.ion files with the functions listed below, I've been meaning to write it up, let me know if that
I've been using parts of it for TCSyncComments -- viewtopic.php?f=6&t=73131 -- and QuickView descript.ion viewer -- viewtopic.php?t=77182 - but not sure how much interest there is in such a library so haven't finished doing so.
I've been using parts of it for TCSyncComments -- viewtopic.php?f=6&t=73131 -- and QuickView descript.ion viewer -- viewtopic.php?t=77182 - but not sure how much interest there is in such a library so haven't finished doing so.
Code: Select all
; Return an an object of all files + their comments
; "file name":="comment", and store path & encoding (best guess)
; of the decript.ion file
Description_Object(path)
; Get full path to descript.ion, pass on folder to check if it has a descript.ion
; used by Description_Object()
Description_GetPath(path)
; pass on a line from descript.ion and return object
; "file name"="comment"
; used by Description_Object()
Description_GetFileComment(line)
; delete descript.ion file
Description_DeleteAll(path)
; save all comments (object)
Description_Save(Object,SortType="",backup=0,Path="")
; Check if file(s) exist, if not remove from descript.ion
Description_CleanUp(Object,SortType="",backup=0,Path="")
; Add or update file comment(s) (replace, append, prepend)
Description_FileComment(path,file,comment,append=0,backup=0)
; Remove file comment(s)
Description_RemoveFileComment(path,file,backup=0)
; Sort file
Description_SortFile(path,SortType="",backup=0)
; support function:
; There is no way to determine the file Encoding 100% sure, even if a file contains BOM.
; The result of this functions is simply a best guess assuming UTF-8 more common when BOM is missing.
_FileGetFormat(file)
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Descript.ion format specification?
Nice detective-work, Sherlock(s) 
Very helpful!
Reason for asking is because I wanted to create something that can show TC descriptions in Everything (1.5) and can search for these descriptions
And that means these tags can be searched in Everything-speed in TC itself too (if all works properly)
Will post when ready.
Thanks!
Preview:
Image: https://www.voidtools.com/forum/download/file.php?id=4885

Very helpful!
Reason for asking is because I wanted to create something that can show TC descriptions in Everything (1.5) and can search for these descriptions
And that means these tags can be searched in Everything-speed in TC itself too (if all works properly)
Will post when ready.
Thanks!
Preview:
Image: https://www.voidtools.com/forum/download/file.php?id=4885
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Descript.ion format specification?
As described in the Wayback Machine link above, the descript.ion format stores comments in the form
filename.ext<space>comment<line break>
where <line break> can be <cr> or <lf> or <cr><lf>.
The format supports extensions, which start with the character 04 hex followed by the extension code. When I added descript.ion support to Total Commander, I requested an official extension code from the makers of 4dos/4nt to support line breaks, and received code c2 hex.
Something not mentioned is that file names containing one or more spaces must be put in double quotes, e.g.
"file name.ext" comment<cr><lf>
descript.ion files support UTF-8 and UTF-16 Unicode, just make sure to use the byte order mark EF BB BF (UTF-8), FF FE (UTF-16le) or FE FF (UTF-16be) at the start of the file.
filename.ext<space>comment<line break>
where <line break> can be <cr> or <lf> or <cr><lf>.
The format supports extensions, which start with the character 04 hex followed by the extension code. When I added descript.ion support to Total Commander, I requested an official extension code from the makers of 4dos/4nt to support line breaks, and received code c2 hex.
Something not mentioned is that file names containing one or more spaces must be put in double quotes, e.g.
"file name.ext" comment<cr><lf>
descript.ion files support UTF-8 and UTF-16 Unicode, just make sure to use the byte order mark EF BB BF (UTF-8), FF FE (UTF-16le) or FE FF (UTF-16be) at the start of the file.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Descript.ion format specification?
Thank you!
TC can handle this syntax without problems.
Maybe an idea to follow that format? If only for consistency.
Current versions of TCC/TCMD (the successor of 4DOS) do put the filenames in double quotes, regardless if these names contain spaces or not.ghisler(Author) wrote: 2025-03-11, 09:17 UTC Something not mentioned is that file names containing one or more spaces must be put in double quotes, e.g.
"file name.ext" comment<cr><lf>
TC can handle this syntax without problems.
Maybe an idea to follow that format? If only for consistency.
This requires an update in Everything and is therefor not possible at this moment.NotNull wrote: 2025-03-10, 22:13 UTC And that means these tags can be searched in Everything-speed in TC itself too