Read Text File and split them to individual text file

Discussion in 'ASP .Net' started by Krish, Oct 20, 2005.

  1. Krish

    Krish Guest

    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
     
    Krish, Oct 20, 2005
    #1
    1. Advertising

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

    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com



    "Krish" wrote:

    > 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
    >
    >
    >
     
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=, Oct 20, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    470
  2. Anonieko

    HttpHandlers - Learn Them. Use Them.

    Anonieko, Jun 15, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    522
    tdavisjr
    Jun 16, 2006
  3. flamesrock
    Replies:
    3
    Views:
    619
    gene tani
    Jun 7, 2005
  4. why the lucky stiff
    Replies:
    5
    Views:
    146
    why the lucky stiff
    Sep 22, 2004
  5. ela
    Replies:
    7
    Views:
    108
Loading...

Share This Page