tags:

views:

25

answers:

1

Hi All,

I want to get the image list in the image folder in the application folder. The following code will returns the Images in the Mypicture folder.

 string[] files = System.IO.Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures));

Geetha

+1  A: 

AppDomain.CurrentDomain.BaseDirectory

Ragunathan
Run as Administrator
Ragunathan
Run your WPF application in Adminstrator mode, you can access to any folders.
Ragunathan
Ragunathan
Can you check whether the images are created in D:/App/bin/Debug/Images/Banner folder?
Ragunathan
You should set Build Action to each
Ragunathan
Yes. But it gave folder not found so i have removed the bin name.All the have build action = Resource
Geetha
I am not clear whether the images are created in D:/App/bin/Debug/Images/Banner folder? This should be created at compile time.
Ragunathan
base directory only have exe and pdb files
Geetha
I have created like right click add folder + Images. Inside that folder Banner folder + right click add existing items ( Added the images).
Geetha
Ragunathan
Pls read the following articles to know more.http://msdn.microsoft.com/en-us/library/aa970494.aspxhttp://csharpsimplified.wordpress.com/2009/02/16/resources-in-wpf-i-binary-resources/
Ragunathan