Mintoris Forum

Author Topic: Ftp Client Array Problem  (Read 2558 times)

zakeryclarke

  • Full Member
  • ***
  • Posts: 45
  • I think therefore I am.
Ftp Client Array Problem
« on: Jun 20, 2014, 01:12 PM »
Hi I'm trying to write a simple ftp client/ HTML Editor. I populate an array using the FTPdir$() function. But I need to add an item to the end of the array that allows the user to go up a directory. I tried using the getdim$() function but couldn't get into work. Thx
<ZAK>

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: Ftp Client Array Problem
« Reply #1 on: Jun 20, 2014, 04:18 PM »
Try this:

d$() = FtpDir$()

a() = getDim(d$())

redim d$(a(1))

d$(a(1)) = "‥"
d$() = Sort$(d$())

-Chuck

zakeryclarke

  • Full Member
  • ***
  • Posts: 45
  • I think therefore I am.
Re: Ftp Client Array Problem
« Reply #2 on: Jun 21, 2014, 04:55 PM »
Chuck, I tried your code, and it succeeded in adding the up directory to the array, but it overwrote the ftp directories
<ZAK>

sraffens

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 220
Re: Ftp Client Array Problem
« Reply #3 on: Jun 21, 2014, 05:15 PM »
Does work

redim d$(a(1)+1)

d$(a(1)+1) = "‥"