PDA

View Full Version : how do dir command in attribute


pikolo543
02-21-2003, 05:27 AM
how can i use in dos command the dir, i want to display the attribute and sort it by date

thanks

hogtied
02-21-2003, 10:05 AM
Displays a list of files and subdirectories in a directory.

DIR [filename] [/A[[:]attributes]] [/B] [/C] [/L] [/N]
[/O[[:]sortorder]] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

[drive:][path][filename]
Specifies drive, directory, and/or files to list.

/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files - Prefix meaning not
/B Uses bare format (no heading information or summary).
/C Display the thousand separator in file sizes. This is the
default. Use /-C to disable display of separator.
/D Same as wide but files are list sorted by column.
/L Uses lowercase.
/N New long list format where filenames are on the far right.
/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 (oldest first)
G Group directories first - Prefix to reverse order
/P Pauses after each screenful of information.
/Q Display the owner of the file.
/S Displays files in specified directory and all subdirectories.
/T Controls which time field displayed or used for sorting
timefield C Creation
A Last Access
W Last Written
/W Uses wide list format.
/X This displays the short names generated for non-8dot3 file
names. The format is that of /N with the short name inserted
before the long name. If no short name is present, blanks are
displayed in its place.
/4 Displays four-digit years

Switches may be preset in the DIRCMD environment variable. Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W.

pikolo543
02-21-2003, 08:33 PM
it doesn't works can you please , give me an exampol in attributes. and sorting dates

Roy Sinclair
02-21-2003, 08:43 PM
The DIR command doesn't list file attributes. It's not like the "ls" command in *nix.

pikolo543
02-21-2003, 09:05 PM
ok thanks

Tails
03-06-2003, 08:30 PM
I thought DIR /C was for displaying compression ratios. It was in DOS 6.22 with Dblspace on.

Roy Sinclair
03-07-2003, 08:45 PM
Originally posted by Tails
I thought DIR /C was for displaying compression ratios. It was in DOS 6.22 with Dblspace on.

Windows NT/2K/XP diverged from DOS when DOS 5.0 was the current MS version. The DOS subsystem was greatly enhanced for NT even though those enhancements were mainly ignored since most people moving to NT weren't much worried about getting a better DOS :D .

Kinja Kahn
03-07-2003, 09:19 PM
Originally posted by Roy Sinclair
The DIR command doesn't list file attributes. It's not like the "ls" command in *nix.

However you can get a list of file with chosen attributes... such as.. DIR /AH will give you a list of files in the directory that are hidden.

Tails
03-08-2003, 06:22 PM
I thought it was bad enough how DOS is getting forgotten. XP doesn't support the Truename command (try it in other versions). Not only that, but the whole point of DOS is batch interactivity, right? XP doesn't have choice.com either. It's useless. It surprises me that they have any external features like find and a few other things. I refer to switching back to 98 from XP as "upgrading". I am not moving from 98 since I use DOS programs very often. I've been told that in 2000, joysticks and sound is not regognized in a DOS box. Pathetic.

Kinja Kahn
03-08-2003, 08:18 PM
Unfortunatly DOS has gone the way of the covered wagon. Adapt and move on.:(

Tails
03-08-2003, 08:21 PM
You tell me of a program that can convert DOS programs to Win32 and then I'll move on.