P
Priya Bange
Guest
Hi Experts,
I have a folder on which file event watcher that get's triggered on csv file loaded into it. I got a requirement to process csv files in pair. Both the csv files contains different columns set over which I need to write Linq , group and load which I will look into later but am stuck on step 1. How to read files in pair together.
Let say path , file event watcher gets triggered when a csv gets loaded into path C:\Processing\ look for a matching pair but if there isn't matching pair don't anything.
I can working on processing for both files but how to check for matching pair on a triggered event.
Now, how to tell its a pair can be formed when every detail matches only difference is
1. 1 file will contain ps
2. 1 fill contain xe
3. rest all text will be same.
Pair 1
Cloud_2001_local_host_ps_2020311161704.csv
Cloud_2001_local_host_xe_2020311161704.csv
Pair 2
Cloud_2002_local_host_ps_2020311161704.csv
Cloud_2002_local_host_xe_2020311161704.csv
Exclude
Cloud_2003_local_host_ps_2020311161705.csv
Cloud_2003_local_host_xe_2020311161708.csv
Any approach or code snipt for reference will be very support still getting comfortable with C#.
Thanks in advance
Priya
Continue reading...
I have a folder on which file event watcher that get's triggered on csv file loaded into it. I got a requirement to process csv files in pair. Both the csv files contains different columns set over which I need to write Linq , group and load which I will look into later but am stuck on step 1. How to read files in pair together.
Let say path , file event watcher gets triggered when a csv gets loaded into path C:\Processing\ look for a matching pair but if there isn't matching pair don't anything.
I can working on processing for both files but how to check for matching pair on a triggered event.
Now, how to tell its a pair can be formed when every detail matches only difference is
1. 1 file will contain ps
2. 1 fill contain xe
3. rest all text will be same.
Pair 1
Cloud_2001_local_host_ps_2020311161704.csv
Cloud_2001_local_host_xe_2020311161704.csv
Pair 2
Cloud_2002_local_host_ps_2020311161704.csv
Cloud_2002_local_host_xe_2020311161704.csv
Exclude
Cloud_2003_local_host_ps_2020311161705.csv
Cloud_2003_local_host_xe_2020311161708.csv
Any approach or code snipt for reference will be very support still getting comfortable with C#.
Thanks in advance
Priya
Continue reading...