Posted: Fri Feb 08, 2002 1:07 pm
Restored from previous forum. Originally posted by altesocke.
hi ppl,
i hope anyone can help me.
i try to get a file listing from a ftp-server. as i don´t got it with the network lib, i used api-calls.
but now the compiler says that my syntax is not correct:
;---------------only FTP-CODE---------------
SPS.WIN32_FIND_DATA
Dim file_ar.WIN32_FIND_DATA(5)
#INTERNET_DEFAULT_FTP_PORT = 21
#INTERNET_SERVICE_FTP = 1
#INTERNET_OPEN_TYPE_DIRECT = 1
#MAX_PATH = 260
userAgent$ = "Ftp-Tool"
user$ = "anonymous"
pass$ = "[url]mailto:alex@rechenkeks.de[/url]"
hopen = InternetOpen_(userAgent$, #INTERNET_OPEN_TYPE_DIRECT, "", "", 0)
conn = InternetConnect_(hopen, 213.160.69.175, #INTERNET_DEFAULT_FTP_PORT, user$, pass$, #INTERNET_SERVICE_FTP, "", 0) ;connect to server
file_find = FtpFindFirstFile_(conn, "*.*", file_ar(0), 0, 0) ;get first file
If file_find=0
MessageRequester("Info", "No file found!", 0)
Else
MessageRequester("Info", "first file found!", 0)
EndIf
file_name$ = file_ar(0)\cFileName ;<---- Syntax Error??
MessageRequester("Info", "File Name = "+file_name$, 0)
;------------------------------------------------------------------
cu socke
hi ppl,
i hope anyone can help me.
i try to get a file listing from a ftp-server. as i don´t got it with the network lib, i used api-calls.
but now the compiler says that my syntax is not correct:
;---------------only FTP-CODE---------------
SPS.WIN32_FIND_DATA
Dim file_ar.WIN32_FIND_DATA(5)
#INTERNET_DEFAULT_FTP_PORT = 21
#INTERNET_SERVICE_FTP = 1
#INTERNET_OPEN_TYPE_DIRECT = 1
#MAX_PATH = 260
userAgent$ = "Ftp-Tool"
user$ = "anonymous"
pass$ = "[url]mailto:alex@rechenkeks.de[/url]"
hopen = InternetOpen_(userAgent$, #INTERNET_OPEN_TYPE_DIRECT, "", "", 0)
conn = InternetConnect_(hopen, 213.160.69.175, #INTERNET_DEFAULT_FTP_PORT, user$, pass$, #INTERNET_SERVICE_FTP, "", 0) ;connect to server
file_find = FtpFindFirstFile_(conn, "*.*", file_ar(0), 0, 0) ;get first file
If file_find=0
MessageRequester("Info", "No file found!", 0)
Else
MessageRequester("Info", "first file found!", 0)
EndIf
file_name$ = file_ar(0)\cFileName ;<---- Syntax Error??
MessageRequester("Info", "File Name = "+file_name$, 0)
;------------------------------------------------------------------
cu socke