Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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.

Ever tried
dir /?
to see the command line parameters?
/O List by files in sorted order.
sortorderN 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

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.

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

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

![]() |
![]() |
![]() |

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