[thelist] ASP FileSystemObject
Salvatore Palmisano
spalmisano at usashs.com
Wed Jan 30 12:48:01 CST 2002
Sorry I didnt read the original code as well as I should have. This test
worked on my system, but be sure to replace the strPath line with your
application variable code.
***
<%
Dim objFSO
Dim objTF
Dim strPath
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
strPath = Server.MapPath("/copy.txt")
'-- Check for existence of text document
If objFSO.FileExists(strPath) = false Then
Response.Write "Does Not Exist<br><br>" & strPath
'-- Create file
TestCreate()
Else
Response.Write "Does Exist<br><br>" & strPath
End If
Sub TestCreate
Dim objFSO, TestFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set TestFile = objFSO.CreateTextFile(strPath, True)
TestFile.WriteLine("Hello World.")
TestFile.Close
End Sub
%>
***
.Salvatore
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Chris Marsh
Sent: Wednesday, January 30, 2002 1:41 PM
To: thelist at lists.evolt.org
Subject: RE: [thelist] ASP FileSystemObject
Thanks for your assistance.
More information about the thelist
mailing list