list.com lives!

Do you remember list.com? it was a program for the dos prompt. It showed the files in the current directory, allowed to view them and to browse the filesystem. It was a 16 bit application and unfortunately cannot be longer used on modern PCs.

It is possible to simulate it in this way:

We use vifm and less. They are freely available for windows, that is the platform where we simulate list.

First of all we create a directory where to put the executables we need, for example C:\Users\<your username>\AppData\Roaming\bin.
This directory must be added to the windows path environment variable.

Then we download vifm for windows and less. In the last page we also download the pcre library.

Then we extract the files in the AppData/bin folder. For less and pcre we copy the contents of the bin directory, in order to have the situation highlighted on this image

We click once on vifm.exe to create the basic configuration. Then we go to C:\Users\<your username>\AppData\Roaming\Vifm and open the vifmrc file with an editor.

We modify the first line which is not a comment replacing it with
set vicmd = less \ -C
and then add these instructions to the end of the file
map e :e<cr>
map q :q<cr>
map x :cq<cr>
map . za
map <space> <pagedown>
only

We also create a list.bat file that invokes vifm with this content:@echo off
for / f "delims =" %% i in ('vifm --choose-dir -% 1') do IF "%% i" NEQ "" (cd %% i)

In this way if we exit from vifm by pressing the “q” key, we will be in the chosen directory.
If we exit with “x” instead, we will be in the beginning directory.

At this point we have the list command available in the command prompt!

Notes:
*) the batch file does not work if the directory contains newline characters (\r or \n) or double quotes ”

*) in order to have a more detailed prompt when viewing files (with less), you can of course change the environment variable LESS, for example by assigning “-Q -M -i” to it

Leave a Reply

Your email address will not be published. Required fields are marked *