show file description? with dir?

Dec 3, 2008
5
0
I've forgotten how to list files including the description. Years ago I would save zipped archives of my software release and save a password in a description. I can still see the passwords - either direction in the file @descript.ion or by an expression including %@Descript[...], but I think it used to be easier, yet I don't see a DIR option to do the trick.

Can someone remind me please?
 
Dec 7, 2009
238
2
Left Coast, USA
"Dir /z" does mangle the filenames. I use the following in a .btm file. It isn't elegant, but it works. The commands "Yellow" "White" and "Cyan" are simple aliases that change the text color (for example, "bri yel on blu"), and "Normal" returns to the default text color.
Code:
do _x in /a:-d *
    if "%@descript[%_x]" == "" ITERATE
    Yellow
    echos  %_x
    White
    echos   '%@descript[%_x]'
    Cyan
    echo   (%@filesize[%_x,bc])
    Normal
enddo

There's a separate DO loop afterward that restricts the display to directories only. That way files with descriptions and subdirectories with descriptions are displayed separately.
 
Dec 3, 2008
5
0
Very nice. Thank you mikea & anrdaemon. Dir /z is what I'd forgotten; the help for /Z is a bit obscure. Luckily my old filenames are mangle-insensitive.

Still I like mikea's "inelegant" file. I've had occasion to write a fair amount of btm files but never noticed echos or include.
 
Dec 7, 2009
238
2
Left Coast, USA
> Still I like mikea's "inelegant" file

I should have said that the output is somewhat inelegant-looking. The DO loop itself is a thing of exquisite beauty.
:-)

Speaking of ITERATE, see the documentation for the LEAVE command — also very useful in a DO loop.