+ Reply to Thread
Results 1 to 3 of 3

Thread: File names changed

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    2

    File names changed

    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

  2. #2
    Junior Member
    Join Date
    Jul 2010
    Posts
    2

    Solved: File names changed

    I should have set the file name to %/c/users... instead of what I did.

  3. #3
    Administrator
    Join Date
    Jan 2004
    Posts
    388

    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.
    Dr Graham Chiu
    Wiki: http://www.compkarori.co.nz:8090
    ph: 1-818-570-2839

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts