Click to See Complete Forum and Search --> : Check for file existance on server
indydavid32
Jan 13th, 2004, 02:57 PM
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!
hellswraith
Jan 13th, 2004, 03:09 PM
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.
indydavid32
Jan 13th, 2004, 03:14 PM
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!
indydavid32
Jan 16th, 2004, 01:14 PM
Anyone?
hellswraith
Jan 16th, 2004, 03:45 PM
System.IO.File.Exists("C:\somefile.txt")
Use things like that. All the functionality you need is in there:
System.IO
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.