This is a working piece of code, but you will have to adapt it a bit.

lst <- c("My_a_21.txt", "your_b_21.txt", "her_c_21.txt", "his_x_11.txt",
"1_v_11.txt", "we_g_11.txt", "they_k_11.txt")
lst[grep("_11.txt", lst)]

I would go about this like this:

setwd("/your/working/dir")
your.object <- list.files()[grep("_11.txt", list.files()]



Cheers,
Roman


On Mon, Dec 13, 2010 at 8:03 PM, gianni lavaredo
<gianni.lavaredo@gmail.com>wrote:

> Dear Researcher,
>
> I have in a foulder severa type of file but  I wish select some type:
>
> My_a_21.txt
> your_b_21.txt
> her_c_21.txt
> his_x_11.txt
> 1_v_11.txt
> we_g_11.txt
> they_k_11.txt
> ...................
> ...................
>
>
> (this the format of original file "09P001_67600_5850_25_21.txt")
>
> i wish to select only file with "_21.txt" and after with "_11.txt", and the
> several ather combination.
>
> normally I use Sys.glob() but I don't know (sorry I am honest) the right
> syntax.
>
> Gianni
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
In God we trust, all others bring data.

	[[alternative HTML version deleted]]

