if (File.Exists(FilePath))
{
GC.Collect();
GC.WaitForPendingFinalizers();
FileInfo f = new FileInfo(FilePath);
f.Delete();
}
if (File.Exists(FilePath))
{
GC.Collect();
GC.WaitForPendingFinalizers();
FileInfo f = new FileInfo(FilePath);
f.Delete();
}