I am trying to develop a junk file cleaner that will take multiple directories using the checked property of checkboxes.There are many checkboxes in the form such as temp,search history,etc..
i am using following code for deletion :
string filePaths = Directory.GetDirectories(@"C:\folder"); foreach (string filePath in filePaths) Directory.Delete(filePath, true);
I dont want to specify the path here instead i want to specify it somewhere else.To keep the code portable i want to run the delete function only once to delete all the paths.
how should i do it?
Edited 5 Years Ago by __avd: Added [code] tags.