Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Rebol file paths ....
Pages: [1] Print
Author Topic: Rebol file paths ....  (Read 792 times)
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Rebol file paths ....
« on: August 16, 2007, 07:49:51 PM »

This one line FTP script seems to have employed the suggested approach for indicating Windows type path/file names....but it fails with the message shown.
The file name llooks like the tutorial example to me ??

write ftp://xxxxxxxxx:zzzzzzzz/ftp.rebolprogrammer.com/cgi/blog.r
   read %"/C/Program Files/Abyss Web Server/htdocs/cgi-bin/blog.r"


** Access Error: Cannot open /C/Program
** Near: do/args script system/script/args
>>
Logged
lucifer1
Newbie
*
Offline Offline

Posts: 3


View Profile
Re: Rebol file paths ....
« Reply #1 on: August 17, 2007, 01:40:21 AM »

Hello,

I regularly hit this problem too.

It is because your path "C:/programm files/..." does include spaces!
REBOL stops at the first space, therefore looking for "C:/programm" which does not exist!

I do not know how to work with spaces in the filename.
Only workaround: Do not use space in filenames.
Logged
PeterWood
Newbie
*
Offline Offline

Posts: 28


View Profile
Re: Rebol file paths ....
« Reply #2 on: August 17, 2007, 02:03:41 AM »

This should help:

Code:
>> to file! "/C/Program Files/Abyss Web Server/htdocs/cgi-bin/blog.r"
== %/C/Program%20Files/Abyss%20Web%20Server/htdocs/cgi-bin/blog.r
Logged
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Re: Rebol file paths ....
« Reply #3 on: August 17, 2007, 04:01:25 AM »

Sadly the  'to file!'  returns the same error.....

One work-around that helps....interestingly.....
is to do a 'change-dir' to the very same 'path' as is in the 'write   -   read'
statement

The 'change-dir' is accepted ,  then the 'read' becomes just the file name   
    read %blog.r    which actually runsl

The only down side is I have to store all my Rebol utilities in the same folder as the
files I wish to address with them.....where I would rather have them in a separate
'utilities' folder.
Logged
Gabriele
Full Member
***
Offline Offline

Posts: 182


View Profile WWW
Re: Rebol file paths ....
« Reply #4 on: August 17, 2007, 05:09:54 AM »

write ftp://xxxxxxxxx:zzzzzzzz/ftp.rebolprogrammer.com/cgi/blog.r
   read %"/C/Program Files/Abyss Web Server/htdocs/cgi-bin/blog.r"


** Access Error: Cannot open /C/Program
** Near: do/args script system/script/args

The problem can't be READ - watch the error message carefully. There's a DO/ARGS happenings. READ works perfectly well with paths with spaces. So, either you have redefined READ in some way, or there's something else going on in your script.
Logged
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Re: Rebol file paths ....
« Reply #5 on: August 17, 2007, 11:55:16 AM »

Perhaps so.....but the script is the site resident ftpup.r  script (one-liner)
with the 'binary' modifier removed to write/read  ascii text............
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Rebol file paths ....
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 07, 2008, 10:41:37 AM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2240 Posts in 584 Topics by 2231 Members
Latest Member: BotOptomA

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc