How would one go about creating a table of file names in a given directory? I'm sure someone has done this before somehow.


Here's my technique for a Win2k system with long filenames:
 
  SET VAR vdir TEXT = c:\rbti\rbwin65
  OUTPUT files.lst
  DIR &vdir
  OUTPUT SCREEN
  CREATE TABLE fnames (fname TEXT (8),fext TEXT (3),fsize INTEGER, +
                       fdate TEXT (8),ftime TEXT (6),longfn TEXT (70) )
  LOAD fnames FROM files.lst

In the process of loading the data R:Base will throw away the records that are not file entries, leaving you with a list of filenames.  You could, of course, add a computed column to give you the 8.3 format combined.  Note that these filenames will not include the full path.


Emmitt Dove
Manager, DairyPak Business Systems
Blue Ridge Paper Products, Inc.
40 Lindeman Drive
Trumbull, CT  06611
(203) 673-2231
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to