0

A few older ones in here will probably remember a cute little proggie from DOS days, hdir it was called. Did nothing special, except show the file and directory listing in colour.
(there were others that did the same thing, but I used this one, so remember its name).

Are there any such today which work under XP (long file names ?) ?

I know ls has a --color option, but the one I'm using from unixkit-tiny has some problems working under my shell, it just displays rubbish, i.e. I haven't been able to get it to work.

Example of rubbish:
←[0m←[01;34mafter←[0m ←[01;34mcolors←[0m ←[0mdiff.vim←[0m ←[01;34mdoc←[0m ←[01;34mftplugin←[0m ←[01;34mplugin←
[0m ←[0mprogram.f90←[0m
←[m"


Not sure whether this should've been posted here or on SO. Not sure who it concerns more.

5 Answers 5

2

You may want to check out NDIR.

1
  • Excellent ! Works like a charm under XP.
    – Rook
    Aug 9, 2009 at 3:53
4

That rubbish is ANSI escape codes. I believe you can still load ansi.sys for the command.com shell.

4
  • +1 for rubbish recognition. Although the process in the link works, command.com under XP doesn't seem to supoort long file names, and ls doesn't seem to work under command.com at all. If I try to reproduce the abovementioned process for cmd.exe, the "Programs" tab doesn't show. Although the process in the link works, the ls doesn't work under command.com, and even if it did, it doesn't look like command.com has the support for long file names.
    – Rook
    Jun 3, 2009 at 1:56
  • (don't mind that last part, it's late and I'm repeating myself)
    – Rook
    Jun 3, 2009 at 1:57
  • yah, you don't want to use the 16-bit command.com a 32bit/64bit operating system. it runs like a pig, and is severely limited. it's just there for compatibility.
    – x0n
    Jun 13, 2009 at 1:13
  • +A for rubbish recognition, which later described why this is not possible anymore under cmd.
    – Rook
    Jul 10, 2009 at 17:08
1

The way I do this is to use Cygwin's ls. It's more heavy-weight than you're talking about, but there are other benefits, such as the availability of the UNIX find utility.

4
  • 1
    I prefer windows native versions of unix tools. Regarding the find utility, windows has one of their own.
    – Rook
    Jun 3, 2009 at 1:59
  • 1
    The Windows native "find.exe" command is very different from the UNIX find command. There is no comparison, unless you're talking about a 3rd party native Windows find program.
    – Eddie
    Jun 3, 2009 at 3:29
  • 1
    @Eddie - I'm sorry. Yes, that came out wrong. What I ment is, Windows has "find" of their own, but I prefer "find" in native version, ie unxutils version.
    – Rook
    Jun 3, 2009 at 3:53
  • 1
    @Idigas: Ah, I've not used the unixutils myself, so I didn't think of that. Good point.
    – Eddie
    Jun 3, 2009 at 18:30
0

I stopped using cmd.exe a long time ago and switched to 4NT (recently renamed to TCC - Take Command Console) - back when I switched command.com didn't have command completion, etc.

Has good color support, arithmetic in scripts, etc. Recommended.

0

A long time ago I used HDIR.COM and was motivated to write my own version in Turbo Pascal, which I called CDIR (ColorDIR). I lost my source code to it in a hard drive crash around 1995, but a few years ago I found an old 3.5" floppy disk that contained one of my last builds of it as an EXE. It has a few more features (pause between long list and scales large sized files into an easier to read unit). No ANSI was involved, DOS had interrupts to adjust colors.

A friend of mine did a similar project and went one step further: he had command line options that would self-modify the program EXE itself. This way, you could configure what colors you wanted for which extension types -- and didn't have to carry around an external CFG file (like show DOC as WHITE or BAT as RED). Your settings would get patched directly into the EXE (I don't think you could add new supported extension types - it just knew what offset to patch). In those days, there was essentially no line between code and data :D

To anyone interested, I have my CDIR.EXE (and other assorted MS-DOS 16-bit real mode tools) archived here: https://github.com/voidstar78/VUC4DOS

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .