Learn R Programming

GetHFData (version 1.7)

ghfd_download_file: Downloads a single file from Bovespa ftp

Description

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.

Usage

ghfd_download_file(my.ftp, out.file, dl.dir = "Dl Files",
  max.dl.tries = 10)

Arguments

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

Value

TRUE if sucessfull, FALSE if not

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab