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

Discussion in 'ASP .Net' started by Nathan Sokalski, Sep 6, 2007.

  1. 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?
     
    Nathan Sokalski, Sep 6, 2007
    #1
    1. Advertising

  2. "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
     
    Mark Rae [MVP], Sep 6, 2007
    #2
    1. Advertising

  3. Nathan Sokalski

    Guest

    On Sep 6, 11:23 am, "Nathan Sokalski" <> 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.
     
    , Sep 6, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: GetFiles()

    Kevin Spencer, Aug 5, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    4,969
    Yan-Hong Huang[MSFT]
    Aug 11, 2003
  2. Alphonse Giambrone

    Multiple Search Pattern for Directory.GetFiles

    Alphonse Giambrone, Jan 22, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    36,968
    MrZedSven
    May 5, 2011
  3. frederik

    GetDirectories UNC path - Acces Denied

    frederik, Feb 1, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    4,877
    frederik
    Feb 2, 2005
  4. =?Utf-8?B?TWlrZSBE?=

    Directory.GetDirectories display order

    =?Utf-8?B?TWlrZSBE?=, Mar 30, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    3,715
    =?Utf-8?B?TWlrZSBE?=
    Mar 30, 2005
  5. =?Utf-8?B?RGFuaWVsIENvcnLDqmE=?=

    Directory.GetFiles() / DirectoryInfo.GetFiles() on a remote server

    =?Utf-8?B?RGFuaWVsIENvcnLDqmE=?=, Mar 22, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    2,055
    BradM
    Mar 24, 2007
Loading...

Share This Page