This could be REALLY involved...
In general:
1- Read-in the file.
2- Decode (convert) the file into a intermediate format.
3- Convert the data into the new format.
4- Save the new format.
You may be able to skip the intermediate format. (For example, you will need an intermediate format if both formats use different methods of file-compression.)
It may be desirable to convert the file a little at a time, rather than all at once. This may be impossible with some file formats.
I don't know anything about the .mdl or 3ds formats, so the following is very general, and I wouldn't want to discourage anyone from attempting something just because it might be difficult... But, most file formats are rather complex with lots if conditional logic and options (if this... then that). This type of program is going to take more than a few hours to write... I would guess that it would take me at least a couple of weeks of full-time research, study, and programming... maybe much longer!
Note: Many file formats are proprietary (secret) and/or require a license ($).