why are you doing things the 'old' way. I would suggest to look into streams as suggested by Brainer.

Also have a read on
http://delphi.about.com/od/fileio/a/fileof_delphi.htm (your 'old' way)
and
http://delphi.about.com/od/vclusing/l/aa110803a.htm (streams the 'new' way)