[thelist] ASP FileSystemObject
Howard Cheng
howcheng at ix.netcom.com
Wed Jan 30 12:24:01 CST 2002
I don't think objTextStream.WriteIn is a method. Use Write() or WriteLine()
instead.
At 06:01 PM 1/30/2002 +0000, Chris Marsh wrote:
><%
>Dim objFSO
>Dim objTF
>Dim strPath
>
>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
>strPath = Server.MapPath(Application("strPath")) & "\news\docs\copy.txt"
>
>'-- Check for existence of text document
>If objFSO.FileExists(strPath) = false Then
> Response.Write "Does Not Exist<br><br>" & strPath
>
>'-- Create file
> Set objTF = objFSO.CreateTextFile(strPath)
> objTF.WriteIn "Hello World"
> objTF.Close
>Else
> Response.Write "Does Exist<br><br>" & strPath
>End If
>%>
::::::::::::::::::::::
Howard Cheng
howcheng at ix.netcom.com
AIM: bennyphoebe
ICQ: 47319315
More information about the thelist
mailing list