How to change the file formate without deleting data?