Hi,
Whatever I try, I get 0 files from GETLIST but the files are there and I can download any file for which I know the name in advance.
But I need the GETLIST output for a scheduled download of files I do not know the name of yet.
So I need GETLIST to work properly.
## My Script where GETLIST always shows 0 files ##
## Please adjust below script for your local download folder ($target_folder) and run it.
##
$ftp_server="x.x.x.x"
$ftp_inlog="xxxxxx"
$ftp_wawo="xxxxxxx"
$ftp_secure="N"
$source_folder="/test"
$source_file="*"
$item="test.xml"
$target_folder="c:\users\thomas\desktop\"
SETPROTOCOL(FTP)
$result=LOCALCHDIR($target_folder)
$result=OPENHOST($ftp_server,$ftp_inlog,$ftp_wawo)
$result=CHDIR($source_folder)
$result=GETLIST($list,REMOTE_FILES,$source_file)
PRINT($result)
PRINT ($list)
$result=GETLIST($list,REMOTE_FILES)
PRINT($result)
PRINT ($list)
$result=GETFILE2($item,$item)
CLOSEHOST
This on a recent install of BulletProof FTP-server version:
Engine: 2017.2.0.36
Compiler 23,00
RTL: 23,00
Raize: 6.1.9
DevEx: 6.20130209
Indy: 10.5.8.0
JCL: 2.7.0.5175
JVCL: 3.48.0.0
LMD: 2012.0
Whatever I try, I get 0 files from GETLIST but the files are there and I can download any file for which I know the name in advance.
But I need the GETLIST output for a scheduled download of files I do not know the name of yet.
So I need GETLIST to work properly.
## My Script where GETLIST always shows 0 files ##
## Please adjust below script for your local download folder ($target_folder) and run it.
##
$ftp_server="x.x.x.x"
$ftp_inlog="xxxxxx"
$ftp_wawo="xxxxxxx"
$ftp_secure="N"
$source_folder="/test"
$source_file="*"
$item="test.xml"
$target_folder="c:\users\thomas\desktop\"
SETPROTOCOL(FTP)
$result=LOCALCHDIR($target_folder)
$result=OPENHOST($ftp_server,$ftp_inlog,$ftp_wawo)
$result=CHDIR($source_folder)
$result=GETLIST($list,REMOTE_FILES,$source_file)
PRINT($result)
PRINT ($list)
$result=GETLIST($list,REMOTE_FILES)
PRINT($result)
PRINT ($list)
$result=GETFILE2($item,$item)
CLOSEHOST
This on a recent install of BulletProof FTP-server version:
Engine: 2017.2.0.36
Compiler 23,00
RTL: 23,00
Raize: 6.1.9
DevEx: 6.20130209
Indy: 10.5.8.0
JCL: 2.7.0.5175
JVCL: 3.48.0.0
LMD: 2012.0
Hello Thomas,
I logged in your FTP server and the "test" directory does not contain any files. Note that the command GETLIST retrieves the list of the current remote directory and you have set this directory to "test" using CHDIR previously.
I logged in your FTP server and the "test" directory does not contain any files. Note that the command GETLIST retrieves the list of the current remote directory and you have set this directory to "test" using CHDIR previously.
liked Script FTP? Try our other product Email Parser