Hi<BR>I am using GetFiles method of the System.IO on a directory<BR>i pass on the string pattern of *s.* <BR>now this should return me all the files ending with s of any extension.<BR>What i get is all the files ending with s of any extension as well as all those files whose extension ends with s<BR>so if i have files <BR>filenames.xml<BR>test.xls<BR>samples.xls<BR><B R>in the result i want only two files <BR>filenames.xml and samples.xls<BR><BR>but i get all three..<BR>is this a a bug or ami missing something?<BR><BR><BR>============================ ====CODE==========================<BR>private void Button1_Click(object sender, System.EventArgs e)<BR> {<BR> try<BR> {<BR> <BR> DirectoryInfo curDir= new DirectoryInfo(txtDirPath.Text);<BR> System.IO.FileInfo[] arrFileList;<BR><BR> arrFileList= curDir.GetFiles(txtFilterCriteria.Text);<BR> <BR> if(arrFileList.Length&#062;0)<BR> {<BR> DataGrid1.DataSource=arrFileList;<BR> DataGrid1.DataBind();<BR> DataGrid1.Visible=true;<BR> }<BR> else<BR> {<BR> Label1.Text="No Files found";<BR> Label1.Visible=true;<BR> DataGrid1.Visible=false;<BR> }<BR> }<BR> catch (System.Security.SecurityException except)<BR> {<BR> Label1.Text="Security Exception";<BR> }<BR><BR> }<BR><BR>========================================= =====================