DirectoryInfo error

  • Thread starter Thread starter rocio
  • Start date Start date
R

rocio

I'm trying to get a listing of all files in the directory \SD Card\images\,
and when I try the following, the code throws me an exemption:
DirectoyNotFound :

Dim di as new DirectoryInfo("\SD Card\images")

any ideas why?
Yes the directory does exist in the PPC, and ther files ther that I need to
access.
 
Rocio:

Are you running the code on the PDA or the emulator? And what type of
device is it, I'm assuming it's a dell?
If it's an Ipaq for instance, SD Card isn't its name so it will give you a
problem.
I've tried each of these on and not had any problems (making sure of course
that I'm referencing the device type correctly):
const string License = @"Storage Card\License.xml";
const string StorageCard = @"\Storage Card";
const string SDCard = @"\SD Card";

Also, this doesn't fix your problem, but you'll probably want to throw in a
Debug.Assert(Directory.Exists("SD Card\")) to ensure it does exist before
you try to do anything with it.

Let me know about the Device type and hopefully we can narrow it down for
you.
 
Back
Top