WriteFile(Filename,text:string);
WriteFile also automatically overwrites old files, so it fits your purpose of rewriting. here's an example which would create a .bot file, chr(13) + chr(10) are linebreaks.
WriteFile('/bots/Boogie Man.bot','[BOT]' + chr(13) + chr(10) + 'Name=Boogie Man' + chr(13) + chr(10) + 'Color1=$00663633' + chr(13) + chr(10) + 'Color2=$00663633' + chr(13) + chr(10) + 'Skin_Color=$00FFF1F0' + chr(13) + chr(10) + 'Hair_Color=$00010101' + chr(13) + chr(10) + 'Favourite_Weapon=Chainsaw' + chr(13) + chr(10) + 'Secondary_Weapon=0' + chr(13) + chr(10) + 'Friend=' + chr(13) + chr(10) + 'Accuracy=0''Shoot_Dead=0' + chr(13) + chr(10) + 'Grenade_Frequency=10000' + chr(13) + chr(10) + 'Camping=255' + chr(13) + chr(10) + 'OnStartUse=255' + chr(13) + chr(10) + 'Hair=0' + chr(13) + chr(10) + 'Headgear=0' + chr(13) + chr(10) + 'Chain=0' + chr(13) + chr(10) + 'Chat_Frequency=222' + chr(13) + chr(10) + 'Chat_Kill=' + chr(13) + chr(10) + 'Chat_Dead=' + chr(13) + chr(10) + 'Chat_Lowhealth=' + chr(13) + chr(10) + 'Chat_SeeEnemy=' + chr(13) + chr(10) + 'Chat_Winning=');