Hello, I have 4 folders. In folders 1, 2 and 3 I have average 300 MP3 files. A third party application will play the MP3 files from the Main directory. When a button is clicked I want all the contents of the corresponding folder to be copied to the Main directory.
Main
1
2
3
At the moment I am using System.IO.File.Copy() and System.IO.Directory.GetFiles() to copy all the files from the specified directory to the Main directory. Before I copy the files over I delete the existing files in the Main directory.
My current way of accomplishing this task is taking up to 10 minutes because of the need to copy large quantities of files.
Now I have two questions (in order of priority):
Is there a FASTER means of copying these files?
During the copying of the files is there a way to prevent my UI from freezing (waiting for the file transfers to complete)?

Sam HobbsRank #107 · 20.5K reputationPosted Sep 22, 2010, 6:27 PM EDT
You might be able to make it fast by moving the data instead of copying, but I am only guessing and the explanation of why I think that is a bit long for here.
Felipe RamosRank #1,409 · 1.2K reputationPosted Sep 22, 2010, 9:09 AM EDT
Noah NU7 reputationPosted Sep 23, 2010, 9:22 AM EDT
Also I used a background worker / worker thread to prevent the freeze up of the UI.
Sam HobbsRank #107 · 20.5K reputationPosted Sep 23, 2010, 10:18 AM EDT