Topic: automating text deletion from a cvs file

If anyone has ever messed with iTunes iConnect, then you know what the sales reports look like.  Right now, i have a script that'll do the importing if i first open the file (on my pc) and delete the totals and the empty tab at the end of the file.  Below is an example of what i get if i open it in notepad.

USDTotal_Rows    973Total_Amount    30571.83Total_Units    31226

I'd like to know if there's a way to have the import script open the file, find the very end of the file and then delete the totals.  I know how to open the file and find the end of the file, but since its not a set amount of characters, i don't know how to tell it to delete what i need.  Though i guess you could do an array search for the total_rows and then delete everything after that. 

Anyone have some suggestions?  If need be, i can paste the upload script.

Thumbs up