Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get all directories within an Explorer Library

Tags:

c#

How can I get all the library locations added to My Music?

For this example, I have added these directories to the library:

E:\My Music
E:\Mp3

I tried:

Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);

But it returns:

C:\Users\MyUser\Music

like image 279
Vincent Dagpin Avatar asked Apr 12 '13 01:04

Vincent Dagpin


2 Answers

Any libraries added to Media Player should end up in the AppData directory.

Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\Libraries\Music.library-ms"

Maybe this will help.

like image 173
Rikki B Avatar answered Nov 15 '22 18:11

Rikki B


Are you trying to develop a Windows Store Application? If yes, try with the Windows.Store library as suggested here

MSDN: http://msdn.microsoft.com/it-it/library/windows/apps/windows.storage.knownfolders.musiclibrary

like image 29
Francesco De Lisi Avatar answered Nov 15 '22 19:11

Francesco De Lisi