Monday, February 05, 2007

The power of DIR

Did you know that the DIR commmand can provide extra information to you? Take the /q switch... it will show you the owner of a file:

C:\>dir /q c*.*
Volume in drive C is System...
03/22/2006 01:06 PM 0 BUILTIN\Administrators CONFIG.SYS

1 File(s) 0 bytes

As you can see you have the owner of the file at a glance (BUILTIN\Administrators) in this case.
Another useful switch may be /b which will display only the file names without any other information, so you can redirect the list to a file in order to obtain file lists.
The /s switch will recurse the subdirectories and display the wole folder structure.
Of course that there are other switches to DIR... discover them yourself by typing DIR /?...

No comments: