I wrote a script which looped through a series of web pages, downloaded them and saved them off as files. Easy enough. After verifying that the code worked I changed the code into a function, so I could simply pass some parameters and not have to change the internals. What is happening now is that the file is being changed somehow from what I created to the same with "/c/program files (x86)/rebol/view/" appended to the front of it. The script follows with the error: >> basefile == %/c/users/steve/documents/bom/ >> bom: func [book numch] [ [ basefile: %c/users/steve/documents/bom/ [ for counter 1 numch 1 [ [ addr: rejoin [http://scriptures.lds.org/en/ book "/" counter] [ afile: rejoin [basefile book "/" book counter ".htm"] [ print afile [ print "" [ write afile (read addr) [ ] [ ] >> bom "alma" 63 c/users/steve/documents/bom/alma/alma1.htm connecting to: scriptures.lds.org ** Access Error: Cannot open /c/program files (x86)/rebol/view/c/users/steve/documents/bom /alma/alma1.htm ** Where: do-body ** Near: write afile (read addr) Any clues on why it is changing the file path? Thanks, Steve
Hi Steve I think you must be running into Vista/Windows 7 security issues where it is using the virtual file system. Move your script out of the c:\program files path to eg: c:\rebol and it should work. oh ... yeah .. you got that wrong! using relative path addressing.