Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File System Object

Status
Not open for further replies.

siris

Programmer
Aug 13, 2004
10
IN
In my intranet site I let the user enter the path of a file for documentation. But before saving it to the database I use the following statement to check whether the file really exists or not.

If objFSO.FileExists(scPath1) Then
flag = "File Exists"
Else
flag = "File does not exist"
End If

So, for testing I have PWS installed on my system and have IIS4.0 on the main server. The problem here is that the above lines works properly on the PWS but on the server it shows that the file does not exist, although I know that the file is there. What could be the problem in File System Object here.
Thanks.
 
Try to use GetFile method of the objfso

set MyFile=objFSO.GetFile(scPath1)
If IsObject(MyFile) Then
flag = "File Exists"
Else
flag = "File does not exist"
End If

________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top