How to split one .txt file to several .txt files according certain information in file

Hi,
if I have one .txt file with company information, same company on several lines. How I can split this one file to several txt files according company names, so that after splitting I have example files like IKEA.txt and ValMart.txt etc. I have try Read text file and some other things, but only what I have received empty files with wrong names…
Simply answer, I have just started coding : )

Bit hard to know specifically without seeing the text file format, but my starting point would be to do a read text file activity to read the whole thing in, then do a matches activity with a regex format that pulls out the sections that you want.

That’ll give you a list of matches, loop through that in a for each and then write text file activity out to get your individual text files.

examle.txt (347 Bytes)
I have now add here my example file, somehow I should use file.ReadAllLines, but I manage to do only one file, without anything inside.

Hi,

Check this post

Hope this helps

Thanks

Hi

Check this post

Hope this helpss

Thanks