filesystemobject

  • Thread starter Thread starter abcd
  • Start date Start date
A

abcd

from ASP.NET program how can I check the file existance and get properties
of a file on a system....do .net use the same FileSystemObject or are there
other .NET calls availbe to work equivalent to FileSystemObject
capability...

thanks
 
Use the System.IO NameSpace classes. Specifically, you'll be interested in
the File, Directory, FileInfo, and DirectoryInfo classes. See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemio.asp

or, better yet, get your own free copy of the Microsoft .Net SDK from:

http://www.microsoft.com/downloads/...A6-3647-4070-9F41-A333C6B9181D&displaylang=en

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.
 
Teemu thanks.

I am still in classASP world...I need to improve my .NET skills asap and get
familiar with the namespaces....

cheers !
 
can this check for netowrk file

like

Dim fileExists As Boolean =
System.IO.File.Exists("\\msnt102\shared\file.txt")
If fileExists Then...
'Do something with the file
Else
'File does not exist
End if

this code didnt work...I tried mapping that drive too like

Dim fileExists As Boolean = System.IO.File.Exists("x:\shared\file.txt")

are there any special permissions required....any thoughts
 
abcd said:
can this check for netowrk file

like

Dim fileExists As Boolean =
System.IO.File.Exists("\\msnt102\shared\file.txt")
If fileExists Then...
'Do something with the file
Else
'File does not exist
End if

this code didnt work...I tried mapping that drive too like

Dim fileExists As Boolean = System.IO.File.Exists("x:\shared\file.txt")

are there any special permissions required....any thoughts


it should as long as the user that IIS is running under has that drive
mapped or has permission to the server/share
 
This is something configutation issue. I have many such machines which will
have mdb files and I want to access those from my ASP.NET application

Machine A is IIS, ASP.NET application
Machine B,C,D,E,......Z has some files shared....

does that mean that I need toc reate IUSR_A, on each of the machine
B,C,D,E....Z and have that user give permissions....

thanks
 
abcd said:
This is something configutation issue. I have many such machines which will
have mdb files and I want to access those from my ASP.NET application

Machine A is IIS, ASP.NET application
Machine B,C,D,E,......Z has some files shared....

does that mean that I need toc reate IUSR_A, on each of the machine
B,C,D,E....Z and have that user give permissions....

huh? Are they all accessing these from the same website/page? If so
that's the IIS user machine I'm talking about...
 
Back
Top