Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Reading empty directories via FTP error

From: atruter:labyrinth:au at: 11-Nov-2003 21:10

Hi Carl, I've just hit the same problem (1.2.10.3.1 on Windows2000), so it's not just you ;)
>> read ftp://userid:[password--www--site--com--au]/public_html/aa/
connecting to: www.site.com.au ** Access Error: Port none not open ** Where: parse-dir-list ** Near: read ftp://userid:[password--www--site--com--au]/public_html/aa/ You can "avoid" the error by wrapping it in an attempt block
>> attempt [read ftp://userid:[password--www--site--com--au]/public_html/aa/]
connecting to: www.site.com.au == none which then lets you handle empty dirs as follows: attempt [blk: read dest] if not none? blk [ foreach file blk [ ... but I am finding the whole REBOL ftp thing a bit flaky (empty dirs or not) with various port errors cropping up at weird places (almost like once a port error occurs then all downstream operations are impacted). Need to look at this a bit more before giving up on the whole excercise (trying to do a simple FTP sync script in REBOL that actually works). Regards, Ashley