Today I'm wondering if I could delete a TEMP file. I have the coding to delete the correct path name but it wont work on any other win pc due to only allowing me to using my folder naming on pc.
This is because when I play a mp3 though resources in winforms it wont let me play another song till TEMP file from previous play is deleted.
I'm looking for all files delete to save me from selecting a path name where I prefer to delete all files in the TEMP as I want to share my tool with others.
Heres the coding I'm using
if (System.IO.File.Exists(@"C:\Users\g\AppData\Local\Temp"))
{
System.IO.File.Delete(@"C:\Users\g\AppData\Local\Temp");
MessageBox.Show("TEMP File Deleted");
}
else
{
MessageBox.Show("Not Done");
}