I have a button to backup my local database(SQLITE) to another path so that I can email the file to me. How can I copy the SQLite data to my for example downloads folder?
Here is the code of my backup button:
private void BtnBackup_Clicked(object sender, EventArgs e)
{
string fileName = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "backend.db3");
string backupfile = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments), "backup.db3");
File.Copy(fileName, backupfile, true);
}
I can check if the data has been copied the problem is when I go to the directory no files is being shown