private void deleteLocalFile(string strPath)
{
try
{
FileAttributes attr = File.GetAttributes(strPath);
if (attr == FileAttributes.Directory)
{
Directory.Delete(strPath, true);
}
else
{
File.Delete(strPath);
}
}
catch (Exception ex) { }
}