Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FTP with wildcard
#1
How can I download a file from FTP with wildcard in the filename? There is always only one file to download and its name is different every day.
So far macro below identifies correct filename but how to download it?

Ftp f.Connect("xxx.xxx.xxx.xxx" "username" "password" 0 0 1)

;If need, change current ftp directory to the directory where the file is
if(!f.DirSet("/")) end "failed to set FTP current directory"
ARRAY(STRINT) a

f.DirAll("*" a 2)
int i
for i 0 a.len
,out "%s%s" a[i].s iif(a[i].i " (folder)" "")

;Download to dir
f.SetProgressDialog(1)
if(!f.FileGet("?" "C:\Store\filename.gz")) end "failed to download"

mes "Completed!"


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)