home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 1 / amigaformatcd01.iso / pd / database / fiasco_1.1 / databases / faqs / scantxtdir.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1996-04-30  |  695 b   |  38 lines

  1. /* Scandir.rexx
  2.  * Copyright © 1995 Nils Bandener
  3.  * $VER: scantxtdir.rexx 3.2 (27.12.95)
  4.  */
  5.  
  6. Options Results
  7. Address FIASCO
  8.  
  9. F_RequestFile Drawersonly
  10.  
  11. if rc = 0 then do
  12.  
  13.     directory = result
  14.  
  15.  
  16.     Address Command "list >t:files" directory "lformat %s%s files all pat ~(#?.info)"    /* Make a listing of all files in it */
  17.  
  18.     Address FIASCO
  19.  
  20.     if RC < 10 then do
  21.  
  22.         if Open("g", "t:files", "read") then do
  23.  
  24.             do while ~eof("g")
  25.                 file = ReadLn("g")
  26.                 if file ~= "" then do
  27.                     F_AddRecord
  28.                     F_SetFieldCont "File" file
  29.                 end
  30.             end
  31.  
  32.             call Close("g")
  33.         end
  34.  
  35.     end
  36. end
  37.  
  38.