Read csv file with Random id in file name

So if I understood correctly, you would like to read a CSV file’s content but the CSV filename is unknown to you.

What I would do is loop the directory and pick the file(s) you would like to have read by the robot. Here’s the code that you are able to use in the Invoke Code activity setting the activity’s language to “CSharp”:

string[] Files = Directory.GetFiles(@"C:\MyDir", "*.csv");
foreach (string Filename in Files) {
	Console.WriteLine(Filename);
}

You could then further think about the logics as to how to handle processed files.

Read the following on how to read a CSV file and store its data into a DataTable:

Good luck.