Split records from notepad file into two files

I have a set of lines in a Notepad.txt file. I want to put first half of lines in a note1.txt and next half of lines in note2.txt. How can we do this using UiPath?

read text file, split string using new ling character, you will get a collection and you can find out the count of elements of collection and based on count you can add first half to one file and second half to another file.