ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] Alt-Filedisplay extenstions   [ZEP]

By: Ben Kent       
Date: Mar 10,2004 at 07:23


There have been various requests in the past to change the formatting or information displayed by the Alt-FileDisplay command. This proposal is an attempt to provide a flexible and easy to use way for the user to control how ZTree displays files in the File window.

I propose that the Alt-FileDisplay command be changed from a toggle into a menu, just like the Alt-Kilo command was changed (I forget when) some time ago, on a side note Alt-Kilo is effectively an Alt-F for the directory window.

With the ability to change the console width, the current file display mode can sometimes not match what the user wants to see, i.e. too few columns or not enough information.

The menu will be a selection of toggles to select which predefined fields will be displayed, some option toggles, some options that will have secondary numeric inputs for widths etc, or toggles between predefined values so that secondary input will not be required, as they do not fit with how the rest of ZTree works, but having toggles instead of inputs reduces the fineness of control available to the user.

Where there are multiple options for a toggle Shift-Letter could cycle backward through the list, just like the Archiver selection does for the Ctrl-F5 command.


An example dialog in the menu area.
|FILE DISPLAY: shortName(Y) Size( 0) Date(Y) Time(Y) Length(Y) Attribs(Y) By(Row)|
|              Depth(No  ) tYpe(Y) Justify(Justify) Extwidth(  3) Ordinal(Yes )  |
|Set (set name     ) colMin(min) colmaX(max) Headers(Y)  <-+ F3 Last F4 Reset Esc|

Descriptions of the toggles and options, I've listed all the things that I though might be useful, but I expect at least some of them to be changed or dropped.

o. Justify
How to justify the File name and extension fields

Fixed: Fixed width name and extension fields truncating each part if necessary, like the name mode does at present, works in conjunction with the Extwidth toggle and/or the Shift-Left/Right commands.

Join: Append the extension onto the name, like the long name mode does at present and using the same truncation rules when the joined name is too long to fit the available width.

Justify: This is a new idea suggested by Jurgen. Left justify the name and right justify the extension, with the period tied to the extension, if truncation is required then do in a way that evenly truncates both parts of the name.

Below is an example of the Justify mode in operation using the same file, but when the available width is gradually reduced.

A long file name      .Extension
A long file name    .Extension
A long file name  .Extension
A long file name.Extension
A long file na>.Extensi>
A long file n>.Extens>
A long file >.Exten>
A long file>.Exte>
A long fil>.Ext>
A long f>.Ext>

o. Size
The width that is used to display the file size.
A toggle with the following values: 0, 4, 7, 10, 13 (0 meaning do not display the file size).
When the number representing the size of the file is larger than the available width then the current contraction code will be used to fit it, which is remove comma's then if necessary use the ISO multipliers to reduce the number until it will fit, obeying the "Kilobytes displayed as multiples of" option.

With the 4 and 7 column width options, it will be easy to find files whose size could not be displayed only using the K and M multipliers, to support these files more of the ISO multipliers need to be supported, see below

ISO multipliers
Yotta 10E24 Y
Zetta 10E21 Z
Exa 10E18 E
Peta 10E15 P
Tera 10E12 T
Giga 10E9 G
Mega 10E6 M
Kilo 10E3 k


When 1024 is being used as a multiplier the names should follow the power of 2 standards (IEC 60027 or IEEE 1541), but as only the first character is used and the both the ISO and IEEE standards use the same first letter there is no problem as far as ZTree is concerned.

o. Date and Time
The date and/or time of the file
No: Don't display
Yes: Do display

ZTree at present only keeps the modified date and time stamps in memory, to display the Created and Last Accessed stamps the data would have to be held in memory, which would take at least 16 bytes per file.

These fields could be tri state, like this
No: Don't display
Short: Display the short format
Long: Display the long format

but it is probably better to allow the fitting code to select which format will fit into the available space.

o. Depth
The number of directories deep the file is, useful for creating CD images, as certain CD file systems have limits on the maximum number of directories in a path. This option will only be in effect when the file window is in one of the Branch/Showall/Global modes.

No: Don't display
Path: Display the depth from the root
Rel: If in branch mode the depth of the relative path of the file from the branch root, otherwise the same as "Path"

o. Length
The length of the file name and extension. The Relative option would be useful for creating CD images, and the Path option would be useful for checking that servers don't have paths over 255 characters long as that can cause weird problems as not many programs can use the Unicode API’s that allow longer paths.

No:   Don't display
Name: Display the length of the file name and extension
Path: Display the length of the full path of the file
Rel:  If in branch mode the length of the relative path of the file from the branch root, otherwise the same as "Path"

This field is not stored in memory, but can be easily calculated at display time.

o. Attribs
The file attributes

No:  Don't display
Yes: Do display
Ext: Extended, display the standard attributes as well as the extended attributes; these will probably be read-only to the Attrib command.
  Remote storage (Hierarchical storage systems)

o. Type
Toggle with the following values: 0, 10, 14, 18, 22 (0 meaning do not display)
The Windows file type, as displayed by Explorer
No:  Don't display
Yes: Do display

This is not stored is ZTree's memory at present, all that is needed is a dynamic lookup table/hashtable/dictionary that maps the extension to it's type, this way there is unlikely to be more than 500 entries in the table so the memory required should not be a problem, on a normal machine. The table only needs to be populated whenever the field is requested.

o. ShortName
Display the 8.3 short name as well as the long name, with the name and extension in two fixed width fields.

No:  Don't display
Yes: Do display

Need to handle cases where the short name is not available for example when short name generation has been disabled on NTFS partitions. It’s probably best to display an empty column for those files affected. see http://support.microsoft.com/default.aspx?scid=kb;EN-US;210638

o. Extwidth
The width of the extension min=3, max=255, may end up being implemented as a toggle of pre-selected values, limited by the screen width and the other fields being displayed, limited so that the name field is always at least 8 characters.

The Shift-Left/Right should continue to be shortcuts to this setting, and will support finer control of the setting, if the option is implemented as a toggle.

o. colMin
The minimum width of the fields that are displayed for a file, i.e. the column width. The limit of the minimum will be calculated, from the fields that are being displayed.

o. colmaX
The maximum width of the fields that are displayed for a file, i.e. the column width. This must be bigger than colMin and smaller than the file window width.

Using the values set in colMin, colmaX and the requested fields (name, size date, etc) ZTree will then fit a number of columns of files into the display; the exact number will depend on, number and width of the fields being displayed, the status of split, the width of the console. This calculation will have to be performed whenever any of these parameters are changed.

o. Headers
Whether or not to display a header line describing the contents of each column.
No:  Don't display
Yes: Do display

For example
Name                  Ext        Size   Attr Created
A long file name      .Extension     20 .a.. 01-01-2003 12:00:00

When the headers are displayed, clicking on the header could be a shortcut to changing the sort order to the field selected, even when the headers are not displayed clicking on the divide line above the file could be used to change the sort order.

Shift clicking on a header could set the secondary sort.

o. Divlines
The "Display lines between file columns" Configuration option
No:  Don't display
Yes: Do display

This may be dropped as it can be controlled form the colour configuration program, Alt-F10->F4

o. By
Whether to fill the file window by rows or by columns.

Rows: Fill the rows in one column, before moving to the next column (Current ZTreeWin behaviour)
Cols: Fill the columns in one row, before moving to the next row

o. Ordinal
Display a number (Ordinal) that represents the position that the file is in the file list, due different applications using different collation (sorting) orders, caution must be taken as it cannot be assumed that the position in the ZTree list will be the same as the position is some other program i.e. Windows Explorer, especially for non-Latin (a-z) characters.

No:  Don't display
Disp: Calculate the file numbers based on the Displayed files
All:  Calculate the file numbers based on all files in the directory, including files that may not be displayed due to file specifications or tags-only filters, this may be difficult to implement, so may be dropped from the change.

o. Set

A history list of sets, items that are marked will be toggled through with the Alt-F command (Assuming that Shift-Alt-F is assigned to the menu). The standard modes will be on this list and will not be delete-able, but the user can choose to not highlight them.

But I would like to be able to save preset configurations; to save having to fiddle with the toggles, once the mechanism for this is worked out it could be applied to the Alt-K command.

I'm not quite sure exactly how this will work, parsing the text from the history list into the toggles, and also having a way for the user to define the set name, but to not allow them to edit the saved format of the toggles, some delimiter character maybe.

This concept is foreign to ZTreeWin, and it maybe decided to drop it. If the concept is accepted then there are various places in ZTree that would benefit from the concept of a named set. If it is dropped then a F? key or macro mnemonic to reset to the factory or Configuration program defaults will be required to allow macros.

o. F4 Reset
Reset to factory settings, to enable macros and quick typists who don't want to look at the screen to work out what needs to be changed from the current setting and just want to reset and press some well known keys to get the desired settings.

o. Terms
Field: A field of information regarding a file, i.e. the size or name
Column: All the information regarding a single file, depending on the options chosen there may be more then one file displayed across the display in the file window.

o. There is no number of columns option, as it would make little sense if the file window width were changed using the F8, Alt-F8 or Alt-F7 commands.

So the number of columns that will get displayed will depend on the options selected and on the file window width, which is dependant on the console width and the state of split.

o. The Tag, Name and Ext fields will be mandatory

o. The order in which the fields are displayed will be hard coded.

o. If the requested fields will not fit due to a change of the display width or the state of the split, there will a fixed order of shrinking (reducing the width of) and dropping fields to get to a state were the maximum amount possible of the requested information is displayed given the available space.

Squeezing algorithm
Go through the following steps until the data will fit

  Reduce to short format

  Reduce to short format

  Reduce to min size

Name and Extension
  Reduce to make fit

Drop Fields in the following order
  Short name

Once the data will fit, if there is any slack space the remaining fields should be expanded to fill the slack space.

If the proposal above is implemented, there are some other parts of ZTree that could be reviewed at the some time.

Extensions to Alt-Sort
If new displayable fields end up being added, it makes sense to be able to sort by those fields.

Being able to control the secondary sort levels see would also be useful see http://www.ztw3.com/forum/forum_entry.php?id=51103

Directory sorting
At present the order that directories are in displayed can only be controlled by the OEM/ANSI toggle on the Alt-Sort command. I would like to be able to sort each level of directories by these extra fields
  size of files contained, one level
  size of files contained, tree
  number of files contained, one level
  number of files contained, tree

Sorting directories could be assigned to the Alt-D key as it is free, or Alt-S could be changed when the focus is in the directory window. Alt-S would be more initiative but would break a lot of old habits, by requiring the focus to be in the correct location.


Extensions to Alt-Kilo
With the wider consoles that are now available, and bigger screens that are now commonplace, there is often plenty of space in the directory window that could be used to display extra information. And as the Alt-Kilo command is effectively an Alt-Filedisplay for the directory window, the changes outlined below could be made.

Currently the Alt-Kilo menu looks like this
TREE STATS:  show Size, Count or None (count)
             All or Tagged files (all   )  Directory or Branch (branch)
Display tree statistics in the directory window     <-+ OK  F1 Help  Esc Cancel


Proposed new Alt-Kilo menu
TREE STATS:  Show(count) Branch(branch) Filter(match) Mode(tagged)     F4 Reset
             shortName(off) Attribs(off) Date(off  ) Time(off  ) dEpth(off)
Display tree statistics in the directory window     <-+ OK  F1 Help  Esc Cancel


F4 Reset
  Reset all the toggles to defaults so that macros can easily be written, and for quick typists that want to type a known sequence without having to see what the current state is.

  none:  Nothing
  count: Count of files
  size:  Size of files

  dir:    Single directory
  branch: Branch totals

  all:   All files disregarding any file specification (Current behaviour)
  match: Only consider files that match the current file specification

  all:    All files disregarding any tagging
  tagged: Only consider tagged files

  The short name (8.3) of the current directory
  This is not stored in memory at present.
  off: Do not display
  on:  Do display

  The attributes (rash) for the directory
  off: Do not display
  on:  Do display

  This is not stored in memory at present.
  off:   Do not display
  short: Display the short date format
  long:  Display the long date format

  This is not stored in memory at present.
  off:   Do not display
  short: Display the short time format
  long:  Display the long time format

  How deep this directory is from the root
  off: Do not display
  on:  Do display


Thread locked

Messages in this Thread

94,500 Postings in 11,924 Threads, 348 registered users, 14 users online (0 registered, 14 guests)
Index | Admin contact |   Forum Time: Oct 23, 2019 - 8:29 pm EDT  |  Hits:28,802,857  (6,605 Today )
RSS Feed