Computing.Net > Forums > Disk Operating System > The simple DIR command

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

The simple DIR command

Reply to Message Icon

Name: Coos Bay Lumber
Date: September 1, 2004 at 07:13:14 Pacific
OS: DOS6.2
CPU/Ram: 66/8
Comment:

Is there a switch that can be added to the simple DIR command that can alphabetize the results?

My old DOS books do not indicate what to do here. I have been working with directories that often contain 1-200 little files, and it is difficult to locate the data concerning a certain single file (with poor eyesight) in the middle of a huge group.

Can the switch also be altered to indicate what were the most recent files, or a sort by date?

Wm.



Sponsored Link
Ads by Google

Response Number 1
Name: jboy
Date: September 1, 2004 at 07:43:49 Pacific
Reply:

Ever tried

dir /?

to see the command line parameters?


/O List by files in sorted order.

sortorder

N By name (alphabetic)
S By size (smallest first)
E By extension (alphabetic)
D By date & time (earliest first)
G Group directories first
- Prefix to reverse order


You can set this up in autoexec.bat or from the prompt by using the dircmd variable:

set dircmd=/o:-d

.. would display files by date and in reverse order


Those people that think they know everything are a great annoyance to those of us who do


0

Response Number 2
Name: Coos Bay Lumber
Date: September 1, 2004 at 07:49:21 Pacific
Reply:

Oh, yes. Have used the / for years.

Per your list, am now wondering if the command switch is not case sensitive.

Will add the line to the autoexec.bat file and see if that makes a difference. All this DOS ignoring of commands began last weekend.

Wm.


0

Response Number 3
Name: jboy
Date: September 1, 2004 at 09:30:06 Pacific
Reply:

I'm fairly certain case is not an issue, as I use lower case, yet the DOS 'Help' program examples are all in uppercase.

set dircmd=/o:e/a/p

.. is my preference - however, if I'm dealing with large numbers of files, the old Dosshell file manager is still one of my favourites.

Not sure what you mean by 'ignoring of commands' - perhaps there are other issues in play?


Those people that think they know everything are a great annoyance to those of us who do


0

Response Number 4
Name: BlueRaja
Date: September 2, 2004 at 21:26:48 Pacific
Reply:

If you're looking for a single file, and know at least partially what it's called, you can significally reduce the number of results using wildcards...

AKhalifman@hotmail.com


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: The simple DIR command

Can I print a 'find file' list? www.computing.net/answers/dos/can-i-print-a-find-file-list/14314.html

. & .. in the dir command www.computing.net/answers/dos/-amp-in-the-dir-command/13773.html

DIR command www.computing.net/answers/dos/dir-command/14061.html