Results 1 to 5 of 5

Thread: Check for file existance on server

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    Question Check for file existance on server

    I have a web page that is only used by people here in the office. In this web page, I need to check to see if some files exist on the server.

    How would I do this?

    Also, how could I get the date and time the file was created.

    Thanks!
    Last edited by indydavid32; Jan 13th, 2004 at 04:42 PM.
    David Wilhelm

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Are the files always in the same folder? If so, just set the security on that folder to allow the asp.net account to access it.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    Are the files always in the same folder? If so, just set the security on that folder to allow the asp.net account to access it.
    They are in the same folder everytime. I don't think there is a security issue. I just don't know the code to use to tell me if the file is there or not, and the date and time the file was created.

    Any code you could provide would be greatly appreciated.

    By the way, I am using VB .Net

    Thanks!
    David Wilhelm

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    Anyone?
    David Wilhelm

  5. #5
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    System.IO.File.Exists("C:\somefile.txt")


    Use things like that. All the functionality you need is in there:
    System.IO

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width