check for any files in a directory

Discussion in 'ASP .Net' started by DC Gringo, Sep 22, 2004.

  1. DC Gringo

    DC Gringo Guest

    How do I check to see if a file directory is empty?

    If (System.IO.File.Exists(*.*)) Then
    pnlMyPanel.Visible = True
    End If

    --
    _____
    DC G
    DC Gringo, Sep 22, 2004
    #1
    1. Advertising

  2. DC Gringo

    Curt_C [MVP] Guest

    look at the files.count (I think that was the syntax) for the folder
    object....


    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "DC Gringo" <> wrote in message
    news:...
    > How do I check to see if a file directory is empty?
    >
    > If (System.IO.File.Exists(*.*)) Then
    > pnlMyPanel.Visible = True
    > End If
    >
    > --
    > _____
    > DC G
    >
    >
    Curt_C [MVP], Sep 22, 2004
    #2
    1. Advertising

  3. if (Directory.GetFiles("C:\\Foo").Count == 0)
    {
    }

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:%...
    > look at the files.count (I think that was the syntax) for the folder
    > object....
    >
    >
    > --
    > Curt Christianson
    > Owner/Lead Developer, DF-Software
    > Site: http://www.Darkfalz.com
    > Blog: http://blog.Darkfalz.com
    >
    >
    > "DC Gringo" <> wrote in message
    > news:...
    >> How do I check to see if a file directory is empty?
    >>
    >> If (System.IO.File.Exists(*.*)) Then
    >> pnlMyPanel.Visible = True
    >> End If
    >>
    >> --
    >> _____
    >> DC G
    >>
    >>

    >
    >
    Naveen K Kohli, Sep 22, 2004
    #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. Yuraukar
    Replies:
    0
    Views:
    337
    Yuraukar
    Dec 18, 2003
  2. Lorn
    Replies:
    5
    Views:
    464
  3. Replies:
    2
    Views:
    269
  4. John
    Replies:
    2
    Views:
    375
    Real Gagnon
    Apr 16, 2007
  5. Replies:
    3
    Views:
    1,437
    Rolf Magnus
    Jan 18, 2009
Loading...

Share This Page