Topic: Comment on the remarkable Dir_Date command. (1 of 2), Read 27 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Friday, December 24, 2004 12:36 AM

Hi,

I needed a version of the Dir_Date command, which sorts first by extension and then by name. In other words, an enhancement of the DOS, DIR /OE command. Since this DOS command sorts only by extension, this is indeed an enhancement of that command.

I believe that I have stumbled across something interesting: Specifically, first I use the dir_date command with the default parameters, that is to say, sort by name. Second, I sort by extension; in my Win 98, this means columns 10,13.
This seems to give the desired result, at least for the example I looked at.

I have a hunch that this is true in general. At the same time, I am missing the simple reason. Any explanation.

At first I thought that I will have to mark the blocks by hand, having the same extension. Then sort each such block. But this does not seems necessary.

Thanks and a merry Xmas.

-peter.

 


Topic: Comment on the remarkable Dir_Date command. (2 of 2), Read 24 times
Conf: VEDIT Macro Language Support
From: Ian Binnie
Date: Friday, December 24, 2004 08:14 PM

On 12/24/2004 12:36:09 AM, Peter Rejto wrote:
>Hi,
>
>I needed a version of the
>Dir_Date command, which sorts
>first by extension and then by
>name. In other words, an
>enhancement of the DOS, DIR
>/OE command. Since this DOS
>command sorts only by
>extension, this is indeed an
>enhancement of that command.
>
>I believe that I have stumbled
>across something interesting:
>Specifically, first I use the
>dir_date command with the
>default parameters, that is to
>say, sort by name.

Peter, dir_date does not sort. It returns files in default order.

If you are using NTFS the default order is sorted, because files are stored in a btree structure, but this would not be true for your Win98 which would be using FAT32.

> Second, I
>sort by extension; in my Win
>98, this means columns 10,13.
>This seems to give the desired
>result, at least for the
>example I looked at.
>
>I have a hunch that this is
>true in general. At the same
>time, I am missing the
>simple reason. Any
>explanation.

You would only get a sorted list if the original files were sorted on the disc - actually quite common if they have been copied from another location.

>At first I thought that I will
>have to mark the blocks by
>hand, having the same
>extension. Then sort each such
>block. But this does not
>seems necessary.

Why not do a multi-key sort?
That way you could guarantee the order.