[BioC] Problems about list files on a FTP site
Martin Morgan
mtmorgan at fhcrc.org
Thu Jun 5 08:57:08 CEST 2008
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
More information about the Bioconductor
mailing list