Just an additional bit of gilding on the lilly...

[EMAIL PROTECTED] wrote:
> 
> 
> dir-list: read %.   ;note the period
> 

I've had a couple of odd situations in which operations on directories
behaved oddly unless I also put the closing "/" at the end of the
directory name, so I've just gotten really picky about doing that
myself.  YMMV.

>
> >
> >
> > I want to process every file in the directory, but
> > how?
> 
> foreach f dir-list [if not dir? f [ print f ]]
> 

Based on my paranoia above...

    foreach f read %./ [if not dir? f [ dosomethingto f]]

-jn-

-- 
; Joel Neely  [EMAIL PROTECTED]  901-263-4460  38017/HKA/9677
REBOL []  print to-string debase decompress #{
    789C0BCE0BAB4A7176CA48CAB53448740FABF474F3720BCC
    B6F4F574CFC888342AC949CE74B50500E1710C0C24000000}

Reply via email to