CreateTextFile
テキスト形式のファイル作成
文法
FileSystemObjectオブジェクト.CreateTextFile (Name[,Option][,Tyee])
パラメータ
Name : 作成ファイル名
Option 上書き指定
上書き(デフォルト) : True/上書きしない : False
Type : Unicode : True/Ascii(デフォルト)
機能説明
テキスト形式のファイルを作成
作成したファイルに書き込む場合はTextStreamオブジェクトを作成
使用例
<%
Dim objFs, objFld, objFldCol, objTs
Set objFs = Server.CreateObject("Scripting.FileSystemObject")
objFs.CreateFolder "D:\test\test3"
Set objTs = objFs.CreateTextFile("D:\test\test3.txt")
objTs.Write "test"
objTs.Close
Set objFld = objFs.GetFolder("D:\test")
Set objFldCol = objFld.Folders
For Each i in objFldCol
Response.Write i.Name & "
" & vbCrlf
Next
'オブジェクトを開放
Set objTs = Nothing
Set objFld = Nothing
Set objFldCol = Nothing
Set objFs = Nothing
%>
Topへ