Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Fixed Bug with DIR /Z displaying descriptions

Jul
68
1
Code:
TCC Prompt   Fri  Jul 10, 2020   9:12:09a


D:\Users\Mark\Documents\test>dir

Volume in drive D is DATA         Serial number is c008:8942
Directory of  D:\Users\Mark\Documents\test\*

7/10/2020   8:47         <DIR>    .
7/10/2020   8:47         <DIR>    ..
                   0 bytes in 0 files and 2 dirs
     635,767,681,024 bytes free

D:\Users\Mark\Documents\test>dir /z

Volume in drive D is DATA         Serial number is c008:8942
Directory of  D:\Users\Mark\Documents\test\*

.            <DIR>       7/10/20  8:47
..           <DIR>       7/10/20  8:47
                   0 bytes in 0 files and 2 dirs
     635,767,681,024 bytes free

D:\Users\Mark\Documents\test>> foo

D:\Users\Mark\Documents\test>> bar

D:\Users\Mark\Documents\test>dir /z

Volume in drive D is DATA         Serial number is c008:8942
Directory of  D:\Users\Mark\Documents\test\*

.            <DIR>       7/10/20  8:49
..           <DIR>       7/10/20  8:49
bar                  0   7/10/20  8:49
foo                  0   7/10/20  8:49
                   0 bytes in 2 files and 2 dirs
     635,767,681,024 bytes free

D:\Users\Mark\Documents\test>*describe bar
Describe "D:\Users\Mark\Documents\test\bar" : dummy

D:\Users\Mark\Documents\test>dir /z

Volume in drive D is DATA         Serial number is c008:8942
Directory of  D:\Users\Mark\Documents\test\*

.            <DIR>       7/10/20  8:49
..           <DIR>       7/10/20  8:49
bar                  0   7/10/20  8:49 dummy
foo                  0   7/10/20  8:49 dummy
                   0 bytes in 2 files and 2 dirs
     635,767,676,928 bytes free

D:\Users\Mark\Documents\test>dir /:

Volume in drive D is DATA         Serial number is c008:8942
Directory of  D:\Users\Mark\Documents\test\*

7/10/2020   8:49         <DIR>    .
7/10/2020   8:49         <DIR>    ..
7/10/2020   8:49               0  bar
                              120    SummaryInformation:$DATA
                                0    {4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA
7/10/2020   8:49               0  foo
                 120 bytes in 2 files and 2 dirs    4,096 bytes allocated
     635,767,676,928 bytes free

D:\Users\Mark\Documents\test>echo %@descript[bar]
dummy

D:\Users\Mark\Documents\test>echo %@descript[foo]
ECHO is OFF

D:\Users\Mark\Documents\test>ver /r

TCC  26.01.40 x64   Windows 10 [Version 10.0.18363.900]
TCC Build 40   Windows 10 Build 18363
Registered to MARK6-WIN10

D:\Users\Mark\Documents\test>

I have an alias for DESCRIBE which I disabled with *DESCRIBE but no aliases for any of the other commands.
I'm using NTFS descriptions, and only one of the files has the SummaryInformation stream but both files showing descriptions with DIR /Z.
 
I can reproduce all of that plus an oddball character in front of "SummaryInformation".

1594399626274.png
 
The oddball character is normal for that stream name (ASCII character 5 I think?) but didn't show up in my copy and paste.
 
The stream is actually a binary stream that contains NTFS summary information, such as Title, Subject, Author, Comments, etc. The description is stored in the "Comments" section. This was under the "Summary" tab in Windows XP under file properties, but that tab doesn't appear anymore in Windows Vista and later. Main point is the description is stored in the "Comments" section. See the help for the DESCRIBE command regarding NTFS descriptions, and the @SUMMARY function for more details.

Code:
TCC Prompt   Fri  Jul 10, 2020  10:08:08a


D:\Users\Mark\Documents\test>dir /z

 Volume in drive D is DATA         Serial number is c008:8942
 Directory of  D:\Users\Mark\Documents\test\*

.            <DIR>       7/10/20  8:49
..           <DIR>       7/10/20  8:49
bar                  0   7/10/20  8:49 dummy
foo                  0   7/10/20  8:49 dummy
                   0 bytes in 2 files and 2 dirs
     635,767,631,872 bytes free

D:\Users\Mark\Documents\test>echo %@summary[bar,Title]
ECHO is OFF

D:\Users\Mark\Documents\test>echo %@summary[bar,Comments]
dummy

D:\Users\Mark\Documents\test>echo %@summary[foo,Title]
ECHO is OFF

D:\Users\Mark\Documents\test>echo %@summary[foo,Comments]
ECHO is OFF

D:\Users\Mark\Documents\test>
 
Last edited:
I can't remember what the {4c8cc155-6c1e-11d1-8e41-00c04fb9386d} stream was for, but it was something related to the summary stream. Something having to do with OLE I think? It's a zero byte stream but I remember it being related to the summary stream somehow. It's described in some Microsoft technical document I read somewhere. Microsoft Word and other programs used to use something called "compound files" to store its summary information, and the "SummaryInformation" stream was a way to store this information for files on an NTFS volume that weren't "compound files". It's related to OLE (Object Linking and Embedding). TCC uses the "Comments" field to store NTFS descriptions.

I hope my knowledge on this is correct, but don't quote me on it.
 
Last edited:
I also realized that all .MSI files are compound files. If the company or person distributing the .MSI file had included "Comments" in the file, it'll show up as an NTFS description even if you never specifically set a description for the file.
 
Check this out:

Code:
TCC Prompt   Fri  Jul 10, 2020  11:53:29a


D:\Users\Mark\Documents\test>dir /z

 Volume in drive D is DATA         Serial number is c008:8942
 Directory of  D:\Users\Mark\Documents\test\*

.            <DIR>       7/10/20  8:49
..           <DIR>       7/10/20  8:49
bar                  0   7/10/20  8:49 dummy
foo                  0   7/10/20  8:49 dummy
                   0 bytes in 2 files and 2 dirs
     635,767,631,872 bytes free

D:\Users\Mark\Documents\test>del /k bar
Deleting D:\Users\Mark\Documents\test\bar
     1 file deleted                4,096 bytes freed

D:\Users\Mark\Documents\test>dir /z

 Volume in drive D is DATA         Serial number is c008:8942
 Directory of  D:\Users\Mark\Documents\test\*

.            <DIR>       7/10/20 11:50
..           <DIR>       7/10/20 11:50
foo                  0   7/10/20  8:49
                   0 bytes in 1 file and 2 dirs
     635,767,635,968 bytes free

D:\Users\Mark\Documents\test>dir D:\Users\Mark\Downloads\*.msi

 Volume in drive D is DATA         Serial number is c008:8942
 Directory of  D:\Users\Mark\Downloads\*.msi

 1/16/2019   2:05      81,924,096  Boxcryptor_v2.32.910_Setup.msi
 5/30/2018   1:27       3,048,960  putty-64bit-0.70-installer.msi
          84,973,056 bytes in 2 files and 0 dirs    84,975,616 bytes allocated
     635,767,635,968 bytes free

D:\Users\Mark\Documents\test>dir /z D:\Users\Mark\Downloads\*.msi

 Volume in drive D is DATA         Serial number is c008:8942
 Directory of  D:\Users\Mark\Downloads\*.msi

Boxcryptor_→  81924096   1/16/19  2:05 This installer database contains the logic and data required to install Boxcryptor.
putty-64bit→   3048960   5/30/18  1:27 This installer database contains the logic and data required to install PuTTY release 0.70 (64-bit).
          84,973,056 bytes in 2 files and 0 dirs    84,975,616 bytes allocated
     635,767,635,968 bytes free

D:\Users\Mark\Documents\test>copy D:\Users\Mark\Downloads\box*.msi aaa.msi
D:\Users\Mark\Downloads\Boxcryptor_v2.32.910_Setup.msi => D:\Users\Mark\Documents\test\aaa.msi

     1 file copied

D:\Users\Mark\Documents\test>dir

 Volume in drive D is DATA         Serial number is c008:8942
 Directory of  D:\Users\Mark\Documents\test\*

 7/10/2020  11:52         <DIR>    .
 7/10/2020  11:52         <DIR>    ..
 7/10/2020  11:52      81,924,096  aaa.msi
 7/10/2020   8:49               0  foo
          81,924,096 bytes in 2 files and 2 dirs    81,924,096 bytes allocated
     635,685,711,872 bytes free

D:\Users\Mark\Documents\test>dir /z

 Volume in drive D is DATA         Serial number is c008:8942
 Directory of  D:\Users\Mark\Documents\test\*

.            <DIR>       7/10/20 11:52
..           <DIR>       7/10/20 11:52
aaa.msi       81924096   7/10/20 11:52 This installer database contains the logic and data required to install Boxcryptor.
foo                  0   7/10/20  8:49 This installer database contains the logic and data required to install Boxcryptor.
          81,924,096 bytes in 2 files and 2 dirs    81,924,096 bytes allocated
     635,685,711,872 bytes free

D:\Users\Mark\Documents\test>
 

Similar threads

Back
Top