Here is a complete list of all the available switches for the DIR
command:
Microsoft Windows 2000 and Windows XP syntax
Displays
a list of files and subdirectories in a directory.
DIR
[drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]
|
[drive:][path][filename]
|
Specifies drive, directory, and/or files
to list.
|
|
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
|
Javier,
Javier Valencia, PE
President
Valencia
Technology Group, L.L.C.
14315 S.
Twilight Ln, Suite #14
Olathe, Kansas
66062-4578
Office
(913)829-0888
Fax (913)649-2904
Cell
(913)915-3137
================================================
Attention:
The information
contained in this message and or attachments is intended
only for the
person or entity to which it is addressed and may contain
confidential
and/or privileged material. Any
review, retransmission,
dissemination or
other use of, or taking of any action in reliance upon,
this information
by persons or entities other than the intended recipient
is prohibited.
If you received this in error, please contact the sender and
delete the
material from all system and destroy all copies.
======================================================
-----Original
Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED]On Behalf Of [EMAIL PROTECTED]
Sent: Thursday, April 07, 2005
6:37 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: Capturing
a listing of files in a directory and importing ...
Well,
there IS a better way if all you care about is
getting the names of the files without the dates
and times.
Use: dir /b
Karen
<<
output tempfile.txt
dir
output scr
Is there a better way?
>>
No, this is the standard way of loading a directory listing in R:Base.
Make
sure to use a TEMP table to load the listing in to, so it will be multi-user
safe.
Alternatively, you could write a plug in, UDF, or Win UDF to return your
results in a comma-delimited string (as long as you know you will not go over
4K characters in the result.
--