F
FcabralJ
Guest
In order to list all the files in a directory I'm trying to ignore part of the filename in the regex pattern, but it is not working. My files have the following format:
20200101_TableA_100000_output.csv
20200101_TableA_100000_output.zip
20200101_TableA_200000_output.csv
20200101_TableA_200000_output.zip
20200101_TableB_100000_output.csv
20200101_TableB_100000_output.zip
I want to get all table A and table B csv files, so I did the followng only to test (the tablevalues will come from a dictionary):
var pattern = "TableA(.*)_IRRBB.csv";
var queries= from f in Directory.EnumerateFiles(inputSourceFiles, pattern)
select f;
But it is returning nothing. Could you please, help me on that?
Continue reading...
20200101_TableA_100000_output.csv
20200101_TableA_100000_output.zip
20200101_TableA_200000_output.csv
20200101_TableA_200000_output.zip
20200101_TableB_100000_output.csv
20200101_TableB_100000_output.zip
I want to get all table A and table B csv files, so I did the followng only to test (the tablevalues will come from a dictionary):
var pattern = "TableA(.*)_IRRBB.csv";
var queries= from f in Directory.EnumerateFiles(inputSourceFiles, pattern)
select f;
But it is returning nothing. Could you please, help me on that?
Continue reading...