ftpupload.r (rebol newbie)
[1/8] from: leeric:ak at: 29-Oct-2000 21:25
Hello all, be gentle, I am a newbie with rebol.
I have tried to use a modified version of the ftpupload.r from the script
library to write files to a ftp site as follows:
____________________________________________________________________________
_________
REBOL [
Title: "Upload Several Files"
File: %ftp-gci-upload.r
Date: 26-May-1999
Purpose: {Upload multiple files with FTP using login and password.}
Category: [ftp net file 1]
]
site: ftp://themarvins:[secret--home--gci--net]/~themarvins/gen/
files: [%marvinline.htm %rupeline.htm]
foreach file files [
write site/:file read file
]
____________________________________________________________________________
_________
I keep getting a:
** User Error: Server error: tcp 550 ./~themarvins/gen/: No such file or
directory..
** Where: write site/:file read file
>>
Using Directory Opus FTP capabilities, I have show the path to really be:
home.gci.net/users/t/h/~themarvins/gen/
I have tried these and several other alternate paths with and without a
ending "/" after "/gen" to this site with no success.
I have send an email to [support--gci--net] and am waiting a reply concerning
their path structure.
Is there anything else about this subject of REBOL that you folks can
enlighten me upon?
Once I resolve the above problem. Could someone show me how to redo the
script so I don't have to type in each file name I desired copied, rather
have a wild card to all the files in the current directory from which I run
the script from?
Also, how do I run a rebol script from the NT AT command, or cron type
utilitiy (I'll take suggestion for cron utilities)
Thanks in advance.
LeEric S. Marvin [leeric--ak--net]
ACSE MCSE MCP+I A+ GROL WL7UO
Amiga/WIN95-8/NT40/WIN2000/LINUX
WINTEL Custom/PII-300/64MB/15.3GB/DVDx10/ZIP100/NT40
www.home.gci.net/~themarvins/
[2/8] from: al:bri:xtra at: 30-Oct-2000 20:01
LeEric S. Marvin wrote:
> site: ftp://themarvins:[secret--home--gci--net]/~themarvins/gen/
>
> files: [%marvinline.htm %rupeline.htm]
>
> foreach file files [
> write site/:file read file
> ]
Try this instead:
site: ftp://themarvins:[secret--home--gci--net]/
Directory: %MyDirectoryOfHtml
files: read Directory
foreach file files [
write site/:file read Directory/file
]
Note that I've dropped off the:
~themarvins/gen/
> Also, how do I run a rebol script from the NT AT command, or cron type
utility (I'll take suggestion for cron utilities)
I don't know this one.
Andrew Martin
Not a NT guru...
ICQ: 26227169
http://members.nbci.com/AndrewMartin/
[3/8] from: leeric:ak at: 29-Oct-2000 23:19
Tried your suggestion, heres the errors.....
Directory: %d/gen/website/gci/gen/
files: read Directory
foreach file files [
write site/:file read Directory/file
]
** Access Error: Cannot open /D/GEN/WebSite/gci/gen/d/gen/website/gci/gen/.
** Where: files: read Directory
foreach file
Please note that the path on my local drive is not the same as at the ftp
site.
local d:\gen\website\gci\gen\
ftp home.gci.net/user/t/h/~themarvins/gen/
[4/8] from: arolls:bigpond:au at: 31-Oct-2000 0:20
Hi,
That should be
foreach file files [
write site/:file read Directory/:file
]
shouldn't it?
Anton.
[5/8] from: al:bri:xtra at: 31-Oct-2000 15:27
LeEric Marvin wrote:
> Tried your suggestion, here's the errors.....
> Directory: %d/gen/website/gci/gen/
<<quoted lines omitted: 3>>
> ]
> ** Access Error: Cannot open
/D/GEN/WebSite/gci/gen/d/gen/website/gci/gen/.
> ** Where: files: read Directory
> foreach file
>
> Please note that the path on my local drive is not the same as at the ftp
site.
> local d:\gen\website\gci\gen\
> ftp home.gci.net/user/t/h/~themarvins/gen/
You just need to make these subtle changes:
Directory: %/d/gen/website/gci/gen/
Note the "/" before the "d/gen/website/gci/gen/". This indicates "the
root" of Rebol's file system. Also, it's best if your script was outside
that directory, otherwise it'll get sent to the site as well (along with
your password!).
This needs to be done as well:
write site/:file read Directory/:file
Note the ":" before the second "file". That's a mistake on my part.
I hope that helps!
Andrew Martin
ICQ: 26227169
http://members.nbci.com/AndrewMartin/
[6/8] from: leeric:ak at: 30-Oct-2000 18:01
Anton, I modified it to:
]
site: ftp://themarvins:[secret--home--gci--net]/~themarvins/gen/
Directory: %d/gen/website/gci/gen/
files: read Directory
foreach file files [
write site/:file read Directory/:file
]
The error is still:
** Access Error: Cannot open /D/GEN/WebSite/gci/gen/d/gen/website/gci/gen/.
** Where: files: read Directory
foreach file
How is the path being duplicated end for end? One portion has upper case,
while the other has lower case?
What ever the case, none of these paths reflect the website paths to which I
want the files written too.
LeEric
[7/8] from: leeric:ak at: 30-Oct-2000 18:25
OK, got rid of the double directory problem. but still have error 550 from
ftp site.
Rebol script is now as follows:
]
site: ftp://themarvins:[secret--home--gci--net]/
Directory: %/d/gen/website/gci/gen/
files: read Directory
foreach file files [
write site/~themarvins/gen/:file read Directory/:file
]
Error is now as follows:
** User Error: Server error: tcp 550 ./~themarvins/gen/: No such file or
directory..
** Where: write site/~themarvins/gen/:file read Directory/:file
Once again I tried varies paths: /user/t/h/~themarvins/gen/ also
putting it in the write statement rather then the site statement. Should
this make any diffrence?
I haven't gotten a responce back from GCI support yet concerning what
exactly the path is.
Thanks Andrew and Anton for your help thus far. LeEric
[8/8] from: al:bri:xtra at: 31-Oct-2000 16:46
Instead of:
write site/~themarvins/gen/:file read Directory/:file
try:
write Site/gen/:File read Directory/:File
The FTP server will make sure the files end up in the right place.
BTW, this directory structure:
%/d/gen/website/gci/gen/
seems overly complicated. Better might be:
%/d/site/gen
I hope that helps!
Andrew Martin
ICQ: 26227169
http://members.nbci.com/AndrewMartin/
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted