I am trying to delete a folder but i can manage to get it right?
The folder i am trying to delete is called ExtractedFiles and it is inside a folder called FormValue.
I can delete a spreadsheet in the same FormValue folder but cant delete the folder.
I think the problem might be that i don't have the right file extension for the folder
This works:
if (File.Exists(tempFolderPathAlt + saveas + ".xls"))
{
File.Delete(tempFolderPathAlt + saveas + ".xls");
}
This does not work:
if (File.Exists(tempFolderPathAlt + "ExtractedFiles"))
{
File.Delete(tempFolderPathAlt + "ExtractedFiles");
}
Could someone please tell me the file extension of a folder or how to delete one?