Okay, I have a document filled with a lot of information, but i only need SOME of it. Ok, the format of the whole document is this: *** **** ****** * *********** *********** ******** * Code (markup): the *'s being different info, i need a script, or program that would split each segement of the above into different txt documents, like the first "***" would go into txt1.txt, the "****" would go to txt2.txt, etc PLEASE POST IF YOU HAVE SOMETHING THAT CAN DO THIS, OR HAVE A QUESTION. (btw the length of the *'s have no importance or relavence) Edit/Delete Message
I've written a python app to do it for you: outputName = 'output' input = open('test.txt') for line in input: columnNum = 0 for column in line.split(' '): columnNum += 1 outputFile = open(outputName + str(columnNum) + '.txt', 'a') outputFile.write(column + '\n') outputFile.close() Code (markup):
My offer still stands, I can make a stand alone application customized for your needs but not for free.
Look at the code - it is very simple. input = open('test.txt') Code (markup): You need to put your input file in the same directory as the python script, and name it test.txt (or change that line of code to load a different file). It'll then create files named output<col num>.txt in that directory too. So if you have got the text.txt file in the directory just double click the python file and all your output files will be created!