getting a list of files in recursive directories
[1/3] 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]
: www.onegecko.com
[2/3] from: dada:gecko:verizon at: 5-Nov-2002 14:44
Funny, huh?
I wasn't even paying attention to the other threads. Just panicked.
I'll keep working at it with the knowledge I've gotten from the other
thread.
Sorry for the stupidity ;)
sd
Sabin Densmore wrote:
> So here's the script:
> iterator: func [] [
<<quoted lines omitted: 19>>
> Thanks in advance,
> sabin
--
striving to be unlike gregor samsa
: [sabin--onegecko--com]
: www.onegecko.com
[3/3] from: rebol665:ifrance at: 5-Nov-2002 21:14
Hi
I am use this to print the content of my cd :
source: %/e/
pf: func [rep [file!] fic [file!]][
if dir? rep [
print [ fic ]
foreach x read rep [
either dir? n-rep: join rep x [
pf n-rep x
][
print ["^(tab)" x]
]
]
]
]
pf source %/
HTH
Ciao
Pat
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted