C# : Filtering data of data table using select method

Posted by Royson on Stack Overflow See other posts from Stack Overflow or by Royson
Published on 2010-03-23T12:21:46Z Indexed on 2010/03/23 12:23 UTC
Read the original article Hit count: 362

Filed under:
|
|
|

I have data table containing one column as FilePath.

FilePath
D:\New folder\link.txt
D:\New folder\SharepointMigration(Work Schedule).xls
D:\New folder\my2\link.txt
D:\New folder\my2\SharepointMigration(Work Schedule).xls
D:\New folder\my2\my3\New Text Document.txt
D:\New folder\Try.txt

I am filtering my data table by

DataRow[] dtRow = dataTable_FilesWithMetaData.Select("FilePath Like '" + sourcePath + "%'");

But it gives me all files and subfolder files. But i want only files not subfolders. How to write such type of filter expression..??

© Stack Overflow or respective owner

Related posts about c#

Related posts about datatable