Yes, that works. I would have never thought of that.

> Hey there Ryan,
> Try adding do before load. I dont know why..
> 
>         read-article: reform ["article-content: do load" rejoin [{%}
>         absolute-path
> file-name]]
> 
> --Ryan
> 
> [EMAIL PROTECTED] wrote:
> 
> > I have a script that saves the following as text files in a directory...
> >
> > make object! [
> >     headline: "in the woods"
> >     subheadline: "out of the woods"
> >     body: ["blue forest" "" "" "red forest" "" "" "green forest" ""]
> > ]
> >
> > How can I load this information and then use it?
> >
> > The following does not work:
> >
> > absolute-path: "absolute/path/articles/"
> >
> > read-directory: reform [ "news-directory: read" rejoin [{%}
> > absolute-path] ] do read-directory
> >
> > news-directory: tail news-directory
> >
> > file-list: copy []
> > for file-grab 1 10 1 [
> >         news-directory: back news-directory
> >         file-name: first news-directory
> >         append file-list file-name
> > ]
> >
> > foreach file-name file-list [
> >         read-article: reform ["article-content: load" rejoin [{%}
> >         absolute-path file-
> > name] ]
> >         do read-article
> >         print article-content/headline
> >         print article-content/subheadline
> > ]
> >
> > ** Script Error: Invalid path value: headline.
> > ** Where: print article-content/headline
> > print article-content/subheadline
> 


Reply via email to