Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] getting a list of files in recursive directories

From: dada::gecko::verizon::net at: 5-Nov-2002 14:12

So here's the script: iterator: func [] [ start: %/d/projects/CVS/gmcard3/body/ foreach file read start [ info: info? file file-type: get in info 'type if file-type <> "directory" [ print file ] iterator ] ] iterator Now, what I'm trying to do is to loop through a directory structure, and based on whether the file that I come across is type 'file or type 'directory, either print it (in the case of 'file) or enter it and run the function again (in the case of 'directory). Can anyone see what I'm doing wrong? I need to build an index page of 131 files with links, and this is the crux (I've got the parse part of the script down that writes out all of the links and such). Thanks in advance, sabin -- striving to be unlike gregor samsa : [sabin--onegecko--com] :