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

Aquiring sub-dir contents

 [1/4] from: ddalley::idirect::com at: 4-Oct-2001 17:32


Hi, REBOLs: Is there a small, simple method (or function) of getting just the file names within a set of sub-drawers? I am having trouble efficiently applying what little directory code there is, in the web database. The parent directory has a set of drawers named (-, A, B, C..., 1, 2, 3...), but the code should work universally with any name set. The goal, of course, is to get only the file names within the drawer set, not the drawer names. -- ---===///||| Donald Dalley |||\\\===--- The World of AmiBroker Support http://webhome.idirect.com/~ddalley UIN/ICQ#: 65203020

 [2/4] from: ryanc:iesco-dms at: 4-Oct-2001 14:50


Does this do what you need? get-sub-files: does [ files: copy [] foreach item read %. [ if dir? item [append files read item] ] ] --Ryan Donald Dalley wrote:
> Hi, REBOLs: > Is there a small, simple method (or function) of getting just the file names
<<quoted lines omitted: 12>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst www.iesco-dms.com 707-468-5400

 [3/4] from: chris:ross-gill at: 4-Oct-2001 18:19


Hi Donald,
> Is there a small, simple method (or function) of getting just the > file names within a set of sub-drawers? I am having trouble
<<quoted lines omitted: 4>>
> goal, of course, is to get only the file names within the drawer set, > not the drawer names.
This might be a useful starting point. Usage: recurse-read ; prints all filenames in the current folder ; including subfolders recurse-read/sub %a/ ; prints all filenames in %a/ and it's subfolders - Chris -- REBOL [] recurse-read: func [ /sub dir [file! url!] /local files [block!] ][ either sub [ dir: dirize dir files: sort read dir ][ dir: %"" files: sort read %. ] foreach file files [ either dir? join dir file [ recurse-read/sub join dir file ][ print rejoin [dir file] ] ] ]

 [4/4] from: petr:krenzelok:trz:cz at: 5-Oct-2001 16:02


Ten thousand million times requested feature for native implementation - load/dir load/files. :-) Every kind of iteration is - slowing things down. Try dirs containing some 700 or more files, placed on network drive. Not all that comfort to work with ... I think that some kind of abstracted access to internal engines would be good on several places, e.g. effect pipeline, ability to find/deep on nested structures/blocks/objects (e.g. system/view/screen-face/pane sub-face). Could speed up rebol in certain operations ... -pekr- Christopher Ross-Gill wrote:

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted