FTP-directory
- Dietmar Jahnel
- Posts: 83
- Joined: Mon Oct 17, 2005 10:33 am
- Location: Austria
- Contact:
FTP-directory
I'm trying to read the files from a ftp-server.
I modified the ftpdir-sample and always get "oFTP:hFTP is null"
both oInternet:hWinINet and oInternet:hSession are empty
Am I doing something wrong or is it a Vista-related problem?
Many thanks for help,
Dietmar
function Main()
local oInternet := TInternet():New()
// local oFTP := TFTP():New( "207.46.133.140", oInternet ) //
local oFTP := TFTP():New( "ftp://ftp.ourserver.at/", oInternet )
local aFiles
if ! Empty( oFTP:hFTP )
aFiles = oFTP:Directory( "*.*" )
AEval( aFiles, { | aFile | MsgInfo( aFile[ 1 ] ) } )
else
MsgAlert( "oFTP:hFTP is null" )
endif
oInternet:End()
MsgInfo( "Done!" )
return nil
I modified the ftpdir-sample and always get "oFTP:hFTP is null"
both oInternet:hWinINet and oInternet:hSession are empty
Am I doing something wrong or is it a Vista-related problem?
Many thanks for help,
Dietmar
function Main()
local oInternet := TInternet():New()
// local oFTP := TFTP():New( "207.46.133.140", oInternet ) //
local oFTP := TFTP():New( "ftp://ftp.ourserver.at/", oInternet )
local aFiles
if ! Empty( oFTP:hFTP )
aFiles = oFTP:Directory( "*.*" )
AEval( aFiles, { | aFile | MsgInfo( aFile[ 1 ] ) } )
else
MsgAlert( "oFTP:hFTP is null" )
endif
oInternet:End()
MsgInfo( "Done!" )
return nil
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Dietmar Jahnel
- Posts: 83
- Joined: Mon Oct 17, 2005 10:33 am
- Location: Austria
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Dietmar Jahnel
- Posts: 83
- Joined: Mon Oct 17, 2005 10:33 am
- Location: Austria
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Dietmar Jahnel
- Posts: 83
- Joined: Mon Oct 17, 2005 10:33 am
- Location: Austria
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Dietmar,
I email you my EXE built using FWH 7.07 and Borland. Please try it there, thanks
I email you my EXE built using FWH 7.07 and Borland. Please try it there, thanks
Last edited by Antonio Linares on Tue Aug 14, 2007 8:08 am, edited 1 time in total.
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- Dietmar Jahnel
- Posts: 83
- Joined: Mon Oct 17, 2005 10:33 am
- Location: Austria
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Dietmar,
Solved. Try it this way:
Solved. Try it this way:
Code: Select all
#include "FiveWin.ch"
function Main()
local oInternet := TInternet():New()
local oFTP := TFTP():New( "ftp.microsoft.com", oInternet )
local aFiles
if ! Empty( oFTP:hFTP )
aFiles = oFTP:Directory( "*.*" )
AEval( aFiles, { | aFile | MsgInfo( aFile[ 1 ] ) } )
else
MsgAlert( "oFTP:hFTP is null" )
endif
oInternet:End()
MsgInfo( "Done!" )
return nil
DLL32 FUNCTION InternetOpen( cApp as LPSTR, n1 AS DWORD, n2 AS LPSTR, n3 AS LPSTR,;
n4 AS DWORD ) AS LONG PASCAL ;
FROM "InternetOpenA" LIB "wininet.dll"
- Dietmar Jahnel
- Posts: 83
- Joined: Mon Oct 17, 2005 10:33 am
- Location: Austria
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Dietmar Jahnel
- Posts: 83
- Joined: Mon Oct 17, 2005 10:33 am
- Location: Austria
- Contact:
Sorry, but now I have another problem:
I need to read the file name and put it in a text file using:
that' s the result:
JBl_E-2006-643-647-VfGH.pdf ÿÿÿÿ ¸ò ˜ò œò ´ò , ò à“" ø“" è ØÝ ØÝ I " "\à P‘ @} N N EEEE T R O O N N N I C SS
230-N NN E T R O O N NN I C
JBl_E-2006-647-649-OGH.pdf i o n D y n a m i c F a l s e ] 3 ' &Uà ›
w™Þ™
T R U S C : \ P ewt’ t’
JBl_E-2006-649-653-OGH.pdf 7-144-Novÿ ûDî Ä P‘ 09:10AM 83386 JBl-2000-145-151-Winkler.pdf
05-02-07 09:10AM 123366 JBl-2000-152-161-Taupitz.pdf
05-02-07 09:10AM 153878 JBl-2000-16-30-Schima.pdf
05-02-07 09
I found some posts about this extra informations, but no solution...
Dietmar
I need to read the file name and put it in a text file using:
Code: Select all
oText := TTxtFile():New( datei )
FOR x = 1 to len(aSpringer)
oText:Add(aSpringer[x,1])
NEXT
JBl_E-2006-643-647-VfGH.pdf ÿÿÿÿ ¸ò ˜ò œò ´ò , ò à“" ø“" è ØÝ ØÝ I " "\à P‘ @} N N EEEE T R O O N N N I C SS
230-N NN E T R O O N NN I C
JBl_E-2006-647-649-OGH.pdf i o n D y n a m i c F a l s e ] 3 ' &Uà ›
w™Þ™
T R U S C : \ P ewt’ t’
JBl_E-2006-649-653-OGH.pdf 7-144-Novÿ ûDî Ä P‘ 09:10AM 83386 JBl-2000-145-151-Winkler.pdf
05-02-07 09:10AM 123366 JBl-2000-152-161-Taupitz.pdf
05-02-07 09:10AM 153878 JBl-2000-16-30-Schima.pdf
05-02-07 09
I found some posts about this extra informations, but no solution...
Dietmar