I am trying to specifiy the folder to download a file using Curl FTP
It uses the current folder by default.
I have trawled all the online doco but I cant find the syntax to specify the local destination.
LET MPROGRAM$="""\hit\pvx\curl.exe""",MDESTINATION$="
ftp://ftp.hatfields.com.au/public_html/Future/Texts/"+TT$,MUSER$=%NW_WEB_USER$+ \
":"+%NW_WEB_PASSWORD$
LET SS$=MPROGRAM$+" -k --ssl -O """+MDESTINATION$+""" --user """+MUSER$+""" "
INVOKE WAIT SS$
The above becomes:
"\hit\pvx\curl.exe" -k --ssl -O "
ftp://ftp.domain.com.au/public_html/Future/Texts/mytestfile.txt" --user "username:password"
1. What is the syntax to specify the destination on the local computer?
I assume it's possible because *web/ftp can do it.
Unfortunately *web/ftp won't work with the new certificate requirements on ftp server. You always get an error.
I've had that discussion before, hence using Curl. The -k and --ssl parameters overcome the certificate issue.
2. Is there a syntax to specify all eg *.txt files on the ftp server to download.
Again I can't find that either.
I did find ranges eg [100-200].txt but that won't work in my case because the files names could be random.
I have resorted to retrieving a file ( ?.txt ) from the ftp server folder and parsing that for individual files.
Thanks