Check File is exist

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cfyam

    #1

    Check File is exist

    How can I check some file is exist or not in my evc dll?


  • Hans Kesting

    #2
    Re: Check File is exist


    "cfyam" <cfyam@mail.apo l.com.tw.p> wrote in message
    news:etwuq4HlDH A.1072@TK2MSFTN GP09.phx.gbl...[color=blue]
    > How can I check some file is exist or not in my evc dll?
    >
    >[/color]

    File.Exists("na me.ext");


    Comment

    • Chris Blodgett

      #3
      Re: Check File is exist

      if (File.Exists(fi lename))
      {

      }
      "cfyam" <cfyam@mail.apo l.com.tw.p> wrote in message
      news:etwuq4HlDH A.1072@TK2MSFTN GP09.phx.gbl...[color=blue]
      > How can I check some file is exist or not in my evc dll?
      >
      >[/color]


      Comment

      • Cantekin Guneser

        #4
        Re: Check File is exist

        using ysystem.IO;

        then

        File.exist(file name);

        returns bool type

        "cfyam" <cfyam@mail.apo l.com.tw.p> wrote in message
        news:etwuq4HlDH A.1072@TK2MSFTN GP09.phx.gbl...[color=blue]
        > How can I check some file is exist or not in my evc dll?
        >
        >[/color]


        Comment

        • Brian Madsen

          #5
          Re: Check File is exist

          "cfyam" <cfyam@mail.apo l.com.tw.p> wrote in message news:<etwuq4HlD HA.1072@TK2MSFT NGP09.phx.gbl>. ..[color=blue]
          > How can I check some file is exist or not in my evc dll?[/color]

          if (System.IO.File .Exists("full-local-path-to-file"))
          {
          // TODO: add code here to do if file exists
          }

          simple as that...

          here's a list of how-tos on file management


          loads of tips on that site which you might find helpful - i know i
          used to.

          Comment

          Working...