Hi Thomas,
Actually, just a few small additions will accomplish what you desire:
REBOL[Author: "Thomas [EMAIL PROTECTED]"]
indent: make string! 20
buffer: make string! 1000
savefile: make file! "dir-list.txt"
if exists? savefile [delete savefile]
list-dirs: func [dir] [
foreach file read dir [
append buffer rejoin[indent file newline]
if dir? dir/:file [
insert indent tab
list-dirs dir/:file
remove indent
]
]
write savefile buffer
]
Russ
--------------------------------------
At 09:24 AM 12/3/1999 -0400, you wrote:
>I know this is probably a trivial question, but I am just beginning to
>learn rebol.
>I am interested in using it to manage a web site and the first thing I
>need to do
>is create a series of all the .htm files in all the subdirectories. I
>have tried this:
>
> indent: make string! 20
>
>list-dirs: func [dir] [
> foreach file read dir [
> print [indent file]
> if dir? dir/:file [
> insert indent tab
> list-dirs dir/:file
> remove indent
> ]
> ]
> ]
>
>which gives me a nice list, but I don't know how to write this to a file
>that I
>can use for management purposes.
>
>Thomas Johnson
>
>
>