Hello, i have a requirement to split huge file (10GB) into several files by checking the row value.
If there is a row with value BRANCH then it will consided as the start row, and if there is a row with value COMPANY NAME then it will be considered as the end row.
Then create a file name with branch name with sequence.
Please find below for the sample.
File original.txt
BRANCH : AB – LOCATION AB
REPORT DATE : 20/01/2021
ATTENTION TO
CIF NO : 123 PRODUCT : PRODUCT ABC
Date transaction Amount Description
1 jan 2021 1000 deposit
2 jan 2021 200 deposit
COMPANY NAME
BRANCH : JJ – LOCATION JJ
REPORT DATE : 20/01/2021
ATTENTION TO
CIF NO : 123 PRODUCT : PRODUCT ABC
Date transaction Amount Description
1 jan 2021 1300 deposit
2 jan 2021 230 deposit
COMPANY NAME
BRANCH : XY – LOCATION XY
REPORT DATE : 20/01/2021
ATTENTION TO
CIF NO : 123 PRODUCT : PRODUCT ABC
Date transaction Amount Description
1 jan 2021 1100 deposit
2 jan 2021 300 deposit
COMPANY NAME
The output would be:
File location_AB_1.txt
BRANCH : AB – LOCATION AB
REPORT DATE : 20/01/2021
ATTENTION TO
CIF NO : 123 PRODUCT : PRODUCT ABC
Date transaction Amount Description
1 jan 2021 1000 deposit
2 jan 2021 200 deposit
COMPANY NAME
File location_JJ_1.txt
BRANCH : JJ – LOCATION JJ
REPORT DATE : 20/01/2021
ATTENTION TO
CIF NO : 123 PRODUCT : PRODUCT ABC
Date transaction Amount Description
1 jan 2021 1300 deposit
2 jan 2021 230 deposit
COMPANY NAME
File location_XY_1.txt
BRANCH : XY – LOCATION XY
REPORT DATE : 20/01/2021
ATTENTION TO
CIF NO : 123 PRODUCT : PRODUCT ABC
Date transaction Amount Description
1 jan 2021 1100 deposit
2 jan 2021 300 deposit
COMPANY NAME
Is there any guidance that i can use with .NET Plaform.?
Thanks you in advanced.
Jhonny