Problems about list files on a FTP site
1
0
Entering edit mode
li lilingdu ▴ 450
@li-lilingdu-1884
Last seen 6.6 years ago
Dear all, For local machine, "list.files" works well to list all files recursively in particular directory. But , is there a function can be used to list all files in particular directory on a FTP site? I use functions of RCurl package to do something like: =========================================================== library(RCurl) getURL("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SOFT/GDS/")->inter ###inter give some meaningful results getURL("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/samples")->i nter2 ###above command did not work Error in curlPerform(curl = curl, .opts = opts, .encoding = .encoding) : RETR response: 550 =========================================================== Any suggestions? Many thanks! --- Ligang [[alternative HTML version deleted]]
• 5.9k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States
LiGang <luzifer.li at="" gmail.com=""> writes: > Dear all, > > For local machine, "list.files" works well to list all files recursively in > particular directory. But , is there a function can be used to list all > files in particular directory on a FTP site? > > I use functions of RCurl package to do something like: > > =========================================================== > > library(RCurl) > > getURL("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SOFT/GDS/")->inter > > ###inter give some meaningful results maybe this is better? > curlOptions(ftplistonly=TRUE) -> opt > getURL("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SOFT/GDS/", .opts=opt) -> inter > head(strsplit(inter, "\n")[[1]]) [1] "GDS1.soft.gz" "GDS10.soft.gz" "GDS100.soft.gz" "GDS1001.soft.gz" [5] "GDS1002.soft.gz" "GDS1003.soft.gz" > getURL("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/samples")- >inter2 > > ###above command did not work this seems to work > getURL("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/samples", + .opts=opt)->inter2 > head(strsplit(inter2, "\n")[[1]]) [1] "platforms" "samples" "series" "PLATFORMS.txt" [5] "README.CHANGES" "SERIES.txt" See ?listCurlOptions and the (linux) man page for curl_easy_setopt for ways to set user name and password, and other options. > Error in curlPerform(curl = curl, .opts = opts, .encoding = .encoding) : > > RETR response: 550 > > > =========================================================== > > > > Any suggestions? Many thanks! > > > > --- > > Ligang > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793
ADD COMMENT

Login before adding your answer.

Traffic: 424 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6