Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory

Reply
Thread Tools

System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      09-06-2007
I have an ASP.NET application which displays the directories & files in a
specified directory on the server. I use the
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() to
retrieve the lists of files and directories. I have two very similar
versions of this that I am debugging, both of which use the methods
mentioned above. However, one of them is returning the contents of the
specified directory and the other is returning the contents of the project's
directory. I have checked to see what values are used by and returned by
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles(), and
they use the values I expect, but do not return the directories and files in
that directory. What is going on here?

 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      09-06-2007
"Nathan Sokalski" <> wrote in message
news:...

>I have an ASP.NET application which displays the directories & files in a
>specified directory on the server. I use the
>System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() to
>retrieve the lists of files and directories. I have two very similar
>versions of this that I am debugging, both of which use the methods
>mentioned above. However, one of them is returning the contents of the
>specified directory and the other is returning the contents of the
>project's directory. I have checked to see what values are used by and
>returned by System.IO.Directory.GetDirectories() and
>System.IO.Directory.GetFiles(), and they use the values I expect, but do
>not return the directories and files in that directory. What is going on
>here?


[X-posting removed]

Please show your code...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
 
 
 
zacks@construction-imaging.com
Guest
Posts: n/a
 
      09-06-2007
On Sep 6, 11:23 am, "Nathan Sokalski" <njsokal...@hotmail.com> wrote:
> I have an ASP.NET application which displays the directories & files in a
> specified directory on the server. I use the
> System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() to
> retrieve the lists of files and directories. I have two very similar
> versions of this that I am debugging, both of which use the methods
> mentioned above. However, one of them is returning the contents of the
> specified directory and the other is returning the contents of the project's
> directory. I have checked to see what values are used by and returned by
> System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles(), and
> they use the values I expect, but do not return the directories and files in
> that directory. What is going on here?


Both of those methods work fine for me. You will need to post some
actual code that is having the problem.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Active Directory Authentication: the container specified in the connectionstring cannot be found Theon Greyjoy ASP .Net 0 10-20-2006 07:22 PM
"The attribute syntax specified to the directory service is invali =?Utf-8?B?ZGhucml2ZXJzaWRl?= ASP .Net 0 02-04-2005 01:59 PM
Unable to create the store directory.[The system cannot find the file specified. ] SampathTangudu ASP .Net 0 01-28-2005 04:31 PM
CDO Error: "The pickup directory path is required and was not specified" Alan Howard ASP General 2 07-05-2004 12:03 AM
Active Directory Error "The specified domain either does not exist or could not be contacted" Brad ASP .Net 1 06-22-2004 06:20 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57