Okay, I need to get every audio file on a hard drive, and move them to a single location sorted by the first letter of the artists name, artists name, album, and song title.
I have the code to do that, and it worked on one of the hard drives I'm organizing files from, but the other two contain secured folders and files, and I get an exception when I try and get access to them, and my program justs stops and won't continue.
I'm using something like the following
Any help would be appreciated, and sooner the better.
I have the code to do that, and it worked on one of the hard drives I'm organizing files from, but the other two contain secured folders and files, and I get an exception when I try and get access to them, and my program justs stops and won't continue.
I'm using something like the following
Code:
public System.Collections.Generic.List<string> GetFiles(string StartingDirectory)
{
System.Collections.Generic.List<string> Extensions = new System.Collections.Generic.List<string>();
Extensions.Add("mp3");
//More Extensions
System.Collections.Generic.List<string> Files = new System.Collections.Generic.List<string>();
foreach (string Extension in Extensions)
{
foreach (string File in System.IO.Directory.GetFiles(StartingDirectory, "*." + Extension, System.IO.SearchOption.AllDirectories)) Files.Add(File);
}
return Files;
}
Comment