The Graham Utilities for OS/2 - Version 2


[Warpspeed]

[Table of Contents] [Index] [Previous] [Next]


DS - Dir Sort

Summary

DS sorts directory entries on FAT disks in a specified order.

Icon

Command Line Format

Usage: DS {Switches} Sort Order  <Start Path> Drive Spec(s)

Switches

-a
All disks.
-h
Hard disks only.
-s
Include subdirectories in the search.
-on
Run on Machine Name.

Note : If no drive specifications are entered the current drive is the only one displayed.

Sort Order

D
Sort by date order.
E
Sort by Extension.
N
Sort by Name.
S
Sort by Size order.
T
Sort by Time order.
-
Reverse the default sort order. The default is to sort from lowest (first) to highest (last). This option reverses this default.

Note : At least one of the Sort Order options must be entered. Multiple options may be entered, in which case the second and subsequent options are used to further distinguish the sort criteria.

Description

The FAT file system unlike HPFS, does not sort it's directory entries. The files are displayed in the order in which they were found - which can lead to some confusing situations. To prevent this, DS can be used to sort the directory entries.

DS must be able to lock the disk for exclusive access for it to be able to proceed. If it can not, it will inform you that it can not lock the disk and then exit.

If you ask DS to sort a non FAT drive you will receive the following message:

Drive is not FAT.
Note : The 16 bit version of DS will only be able to sort approximately 2000 entries per directory. If this number is exceeded, the directory will not be changed. The 32 bit version of DS does not have this restriction.

DS does not currently support a full screen interactive mode.

-a All disks

DS will scan all logical disk drives defined by the system, starting at drive A:. The drives are scanned in order, starting at A:, then B: and so on.

-h Hard disks only

DS will scan all logical disk drives defined by the system, starting at drive C:. The drives are scanned in order, starting at C:, then D: and so on.

-s Subdirectories

DS will include subdirectories as part of its search of the specified disk drives. If a subdirectory name is included as part of the file specification, then the search will include that subdirectory and all subdirectories below it. If no subdirectory is given as part of the file specification, then the current directory and all below it are included in the search.

-on Run on Machine Name

This switch forces DEPIPE to be loaded and allows FAT-Dfrg to access disk drives located on remote machines. The Machine Name must be specified with a leading "\\". The machine name of the remote machine will have been specified when the network software on the remote machine was installed.

Note : DESVR must be running on the remote machine for this option to work.

Consult Appendix H - DESVR for further details.

Examples

DS en D:\
DS will sort all files in the root directory of D:. The files will be sorted by Extension followed by Name.
DS -EN G:\ /s
DS will sort all of the files on drive G: in reverse order.
DS DT D:\WORK
DS will sort all of the files in D:\WORK in date and then in time order. If there are multiple files all of the same date, the time will be used to further distinguish them.
DS -EN A:\ /s -on \\B5
DS will sort all of the files on the A: drive on the machine named B5 in reverse order.