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 HobbsPosted Sep 22, 2010, 10:27 PM
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.
Sam HobbsPosted Sep 23, 2010, 2:18 PM
Noah NUPosted Sep 23, 2010, 1:22 PM
Also I used a background worker / worker thread to prevent the freeze up of the UI.
Felipe RamosPosted Sep 22, 2010, 1:09 PM