It may not be clear from Sealeopard's post (some of the folks on this board cruise along somewhere in the scripting stratosphere), but if you are not conversant with the built-in readprofile() and writeprofile() functions, you should familiarize yourself with them. They may be perfect for what you are trying to do and could save you a lot of effort.

NMM