Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach (var file in rootDir.GetFiles())
- {
- ExtensionInfo info;
- if (extensionInfo.TryGetValue(file.Extension, out info) && info.IsIncluded)
- {
- label5.Text = info.Description;
- }
- }
- // foreach (string ext in extensions)
- // {
- // try
- // {
- // filesacc = rootDir.GetFiles(ext);
- // if (ext == "*.mp3")
- // { label5.Text = "MP3 Audio"; }
- // else if (ext == "*.m4a")
- // { label5.Text = "iTunes AAC Audio"; }
- // else if (ext == "*.m4b")
- // { label5.Text = "iTunes Audio Book"; }
- // else if (ext == "*.m4v")
- // { label5.Text = "iTunes Video"; }
- // else if (ext == "*.m4p")
- // { label5.Text = "iTunes Protected Audio"; }
- // else if (ext == "*.flac")
- // { label5.Text = "Lossless Flac Audio"; }
- // else if (ext == "*.wav")
- // { label5.Text = "Windows Audio"; }
- // else if (ext == "*.mp4")
- // { label5.Text = "Mp4 Audio/Video"; }
- // }
- // catch (UnauthorizedAccessException)
- // { }
- if (filesacc != null)
- {
- foreach (FileInfo fi in filesacc)
- {
- files.Add(fi.FullName.ToString());
- label8.Text = fi.FullName;
- }
- }
- subDirs = rootDir.GetDirectories();
- foreach (DirectoryInfo dirInfo in subDirs)
- {
- try
- {
- foreach (string GFI in Directory.GetFiles(dirInfo.FullName, ext, SearchOption.AllDirectories))
- {
- label7.Text = Path.GetDirectoryName(GFI);
- label8.Text = Path.GetFileName(GFI);
- files.Add(GFI);
- label7.Text = "Directory";
- label8.Text = "File";
- }
- }
- catch (UnauthorizedAccessException) { }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement