[net.micro.pc] Sorting PC directories

heiser@cca.UUCP (Bill Heiser) (09/17/84)

Yes, there is a way to sort IBM PC directories, but since I don't have
a DOS manual here, I can't give you the command.  There is a method of
running the dir command through the sort filter, as I recall.   Check
under Filters and/or Pipelines.

seaburg@uiucdcs.UUCP (09/21/84)

To sort a directory, enter

	dir | sort

If you don't want it to scroll away from you before you can read it,
try

	dir | sort | more

instead.  SORT and MORE are not resident commands in DOS 2.1, so they
must be on the disk.  These create temporary files for the pipeline,
so you must have enough space for them also.  (The temporary files get
erased at the end of the pipe, I believe.)

thielges@uiucdcsb.UUCP (09/21/84)

To sort a directory, type the command :

dir | sort/+14

source : IBM-PC DOS manual, page 10-26

					Bart Thielges

thielges@uiucdcsb.UUCP (09/21/84)

oops, my sort command suggestion sorts by size.  Leave off the /+14

guido@mcvax.UUCP (Guido van Rossum) (09/25/84)

I have a C program which does this.  In fact, it mimics the behaviour
of "ls" on Unix.  However, it only prints the file names, N per line.
On request, I will post it (though you should be able to write it
yourself).  You need a Lattice C compiler and DOS 2.0.

--
	Guido van Rossum, "Stamp Out BASIC" Committee, CWI, Amsterdam
	guido @ mcvax