[R] listing the files in a directory using regular expressions

siddu479 onlyfordigitalstuff at gmail.com
Sun Oct 14 09:13:09 CEST 2012


Hi Experts,
  
  This might be silly question that I am asking, but no way as I am new to
R.
I want to list the files in a directory using regular expression like
A_B*_C*.csv  etc.
How to make this possible in R ?
I tried like this list.files(dir=".", pattern="A_B*_C*.csv") but this gives
no output, whereas list.files(.... pattern="*.csv") giving all the .csv
files in the output, which I do not want.

Thanks
Sidda
   



--
View this message in context: http://r.789695.n4.nabble.com/listing-the-files-in-a-directory-using-regular-expressions-tp4646119.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list