This function will take as input a ftp addresss, the name of the downloaded file in the local drive, and it will download the corresponding file. Returns TRUE if it worked and FALSE otherwise.
ghfd_download_file(my.ftp, out.file, dl.dir = "Dl Files", max.dl.tries = 10)
my.ftp | A complete, including file name, ftp address to download the file from |
---|---|
out.file | Name of downloaded file with HFT data from Bovespa |
dl.dir | The folder to download the zip files (default = 'ftp files') |
max.dl.tries | Maximum attempts to download the files from ftp |
TRUE if sucessfull, FALSE if not
my.ftp <- 'ftp://ftp.bmf.com.br/MarketData/Bovespa-Opcoes/NEG_OPCOES_20151229.zip' out.file <- 'temp.zip'# NOT RUN { ghfd_download_file(my.ftp = my.ftp, out.file=out.file) # }