|
-
Jan 13th, 2004, 03:57 PM
#1
Thread Starter
Fanatic Member
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
-
Jan 13th, 2004, 04:09 PM
#2
PowerPoster
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.
-
Jan 13th, 2004, 04:14 PM
#3
Thread Starter
Fanatic Member
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!
-
Jan 16th, 2004, 02:14 PM
#4
Thread Starter
Fanatic Member
-
Jan 16th, 2004, 04:45 PM
#5
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|