Sounds to me that "dir" is something you had defined when running from your
console but failed to set in your program. Start a fresh REBOL instance and
see if it still "works" from console. Basically, be sure "dir" is defined
(in your program) and is of type file!. If "dir" is a string, put "to-file"
ahead if it (after the read): read to-file dir. Good luck!
Russ
-----
At 09:49 AM 12/20/1999 -0400, you wrote:
>Hello rebols!
>I wonder if someone could help me here. I keep getting the following
>error when I run my program.
>
>
>** Script Error: read expected source argument of type: file url
>object block.
>** Where: foreach file read dir [
> if find file "htm" [
> page: join dir file
> save page replace read page "width=530" "width=480"
> ]
>]
>
>
>But when I execute this from command line it has no trouble reading
>"dir", only when I run the program.
>
>foreach file read dir [if find file "htm"[ print file]] <-- this
>prints out all the "htm" files in the directory
>
>
>Thanks in advance,
>
>Tom
>
>
>