if you mean a text file you can't edit the contents of a text file. You'll have to open the file you want to 'edit' and write the parts you want to another file, leaving out the parts you don't want.
YOU CAN'T EDIT THE CONTENTS OF A TEXT FILE. YOU'LL HAVE TO OPEN THE FILE YOU WANT TO 'EDIT' AND WRITE THE PARTS YOU WANT TO ANOTHER FILE, LEAVING OUT THE PARTS YOU DON'T WANT.