Last active
May 10, 2024 11:04
-
-
Save adamhsparks/18f7702906f33dd66788e0078979ff9a to your computer and use it in GitHub Desktop.
list ftp site files using {curl} (not {RCurl}) in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ftp_base <- "ftp://" | |
list_files <- curl::new_handle() | |
curl::handle_setopt(list_files, ftp_use_epsv = TRUE, dirlistonly = TRUE) | |
con <- curl::curl(url = ftp_base, "r", handle = list_files) | |
files <- readLines(con) | |
close(con) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome! Glad it’s useful. That’s why I shared it so others could use it. Thanks for letting me know