Xojo Conferences
XDCMay2019MiamiUSA

ftpsuite question (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Anyone got a quickfix expiring?
Next thread: Container Controls and Property Window


FW: Special Valentine's Offer for Valentina - Beat the Price Increase!   -   Lynn Fredricks
  ftpsuite question   -   Danny Lewkin
   Re: ftpsuite question   -   Apogee Development - Lists
   Re: ftpsuite question   -   Tim Jones

ftpsuite question
Date: 29.11.07 10:14 (Thu, 29 Nov 2007 10:14:03 +0100)
From: Danny Lewkin
Hi,

I'm havind troubles getting a FTPParsedDirListLineClass from a
ftp_session.DirectoryFileList...
Here's the code, can womeone tell me what I'm doing wrong?
All the properties in the FTPParsedDirListLineClass stay empty for
each line...

Dim ftp_session As New FTPSessionClass
Dim ftpdirlistline As FTPParsedDirListLineClass
Dim list() As String
Dim teststring as string
Dim intCount as Integer

window1.listbox1.ColumnCount = 2

// set FTP login info and server directory
ftp_session.SetLoginInfo("somewhere", "someone", "apassword")
ftp_session.SetServerDirectoryPathName("somewhere")
ftp_session.SetStatusReporting(True)

ftp_session.StartGetDirList

FTPDone = False
do
loop until FTPDone

teststring = ReplaceLineEndings(ftp_session.DirectoryFileList,
EndOfLine)

list = Split(teststring, EndOfLine)

If list(UBound(list)) = "" Then
list.Remove(UBound(list))
End If

for intCount = 0 to UBound(list)

ftpdirlistline = new FTPParsedDirListLineClass
ftpdirlistline = ftp_session.ParseDirListLine(list(intCount))

window1.listbox1.Addrow("")
window1.listBox1.Cell(window1.listbox1.LastIndex, 0) =
ftpdirlistline.Name
if ftpdirlistline.IsDir Then
Window1.Listbox1.cell(Window1.ListBox1.LastIndex, 1) = "Is
Directory"
elseif ftpdirlistline.IsFile Then
Window1.ListBox1.Cell(Window1.ListBox1.LastIndex, 1) = "Is File"
end if
next intCount

ftp_session.logoff

So in 'list' I get 34 lines, with a date, time, <DIR> or a size,
name, but all of these properties of 'ftpdirlistline' stay empty for
each line...

Thanks in advance,

Danny
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: ftpsuite question
Date: 30.11.07 03:08 (Thu, 29 Nov 2007 21:08:35 -0500)
From: Apogee Development - Lists
I'll look into this offline as this was also sent as an incident.

On Nov 29, 2007, at 4:14 AM, Danny Lewkin wrote:

> Hi,
>
> I'm havind troubles getting a FTPParsedDirListLineClass from a
> ftp_session.DirectoryFileList...
> Here's the code, can womeone tell me what I'm doing wrong?
> All the properties in the FTPParsedDirListLineClass stay empty for
> each line...
>
> Dim ftp_session As New FTPSessionClass
> Dim ftpdirlistline As FTPParsedDirListLineClass
> Dim list() As String
> Dim teststring as string
> Dim intCount as Integer
>
> window1.listbox1.ColumnCount = 2
>
> // set FTP login info and server directory
> ftp_session.SetLoginInfo("somewhere", "someone", "apassword")
> ftp_session.SetServerDirectoryPathName("somewhere")
> ftp_session.SetStatusReporting(True)
>
> ftp_session.StartGetDirList
>
> FTPDone = False
> do
> loop until FTPDone
>
> teststring = ReplaceLineEndings(ftp_session.DirectoryFileList,
> EndOfLine)
>
> list = Split(teststring, EndOfLine)
>
> If list(UBound(list)) = "" Then
> list.Remove(UBound(list))
> End If
>
> for intCount = 0 to UBound(list)
>
> ftpdirlistline = new FTPParsedDirListLineClass
> ftpdirlistline = ftp_session.ParseDirListLine(list(intCount))
>
> window1.listbox1.Addrow("")
> window1.listBox1.Cell(window1.listbox1.LastIndex, 0) > ftpdirlistline.Name
> if ftpdirlistline.IsDir Then
> Window1.Listbox1.cell(Window1.ListBox1.LastIndex, 1) = "Is
> Directory"
> elseif ftpdirlistline.IsFile Then
> Window1.ListBox1.Cell(Window1.ListBox1.LastIndex, 1) = "Is
> File"
> end if
> next intCount
>
> ftp_session.logoff
>
> So in 'list' I get 34 lines, with a date, time, <DIR> or a size,
> name, but all of these properties of 'ftpdirlistline' stay empty for
> each line...
>
> Thanks in advance,
>
> Danny
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

Joe Nastasi

Re: ftpsuite question
Date: 30.11.07 17:22 (Fri, 30 Nov 2007 09:22:48 -0700)
From: Tim Jones
On Nov 29, 2007, at 7:08 PM, Apogee Development - Lists wrote:

> I'll look into this offline as this was also sent as an incident.

Hi Joe,

Please share the resolution so we all know.

Tim

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>