>System.IO.File.Copy(source, dest, true); // third param. tells it to overwrite >>
>System.IO.File.Delete(file); >>
>System.IO.File.WriteAllText(path, textToWrite);
>
Thanks Paul and Naomi. After I posted the question I realized I should have been more specific. The "file" in question is a table inside an Access MDB. I am writing via a select as instrSQL = "SELECT FirstName, SecondName INTO [tblSample] FROM [Text;DATABASE=" & Path & ";].[test.txt]"This will work the first time through when the table doesn't exist but throws an error if the table is already there.