Read Text File and split them to individual text file

K

Krish

I have requirement, that i get one big chunk of text file. This text file
will have has information, that on finding "****End of Information****", i
have to split them individual text file with our naming standard (unique id)
and create them designated folder.

This requirement should be created as a batch job and preferrably this job
should monitor the folder where one big chunk of text file lands and process
them immediately.

\\Textfile\IN folder => one big chunk text file comes here by different
source

\\Textfile\Output\yyyyddmm folder => i need to process (split) the text file
coming "IN" folder to different text files based on "End of Information"
delimiter.

I need to achieve this using dot net preferrably using Csharp. Pl. note that
i have recently started learning cSharp but has almost 6 years experience of
using Visual Basic & COM + etc.

Pl. throw any thoughts that you may want to share.

To tell you how the text file will look
unique ID : 999
Text blah blah blah blah......
something here..
some information ...
"****End of Information****"
unique ID : 999
Text blah blah blah blah......
something here..
some information ...
"****End of Information****"
unique ID : 999
Text blah blah blah blah......
something here..
some information ...
"****End of Information****"



Thanks,
Krish
 
G

Guest

Read it in to a String
..Split() the string on ***eof*** into an array.
Loop the array and do your individual work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top