Reading Text and Change Numbers inside
Hello,
I am not sure if maxscript can handle reading large text files but I was just wondering If someone can help me with writing a script.
I have a text file that has multiple lines like this:
76 89 100 4 brown y apple
33 49 121 5 yellow t1 xyz
33 49 121 8 blue any nt
....
I would like to read this file find the min and max of the 4th column
(the columns with values: 4,5,8...)
and re write the text file with a new 4th column that has values of original 4th column+average of min and max of the whole range).
in my case if average is 6 then the new text file should look like this:
76 89 100 10 brown y apple
33 49 121 11 yellow t1 xyz
33 49 121 14 blue any nt
....
The text file has space in between data, would that work If It had "," between data in each row?
Thanks for your help..
Comments
I wonder how you create those
I wonder how you create those 200mb file ? why not splitting it on smaller file?! ...ex : by category, name , or specified thing to different file ...that would make easy to read , fastest to edit with maxscript+.Net.
The size of text file I have
The size of text file I have is about 200MB, and I cannot open it in excel.
I like to see if it's possible to do it with maxscript..
wouldn't this be an Excel spreadsheet question ?
tho I'm sure there are maxscript experts that can do it...