ASP@Workshop
HOME > ASP サンプル集 > ファイルに指定された数の改行文字を書き込む
ファイルに指定された数の改行文字を書き込む

サンプルソース

<%
Set objFso = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFso.OpenTextFile("c:\b.txt", 2, True)

If Err.Number > 0 Then
    Response.Write "Open Error"
Else
    objFile.WriteBlankLines 10
End If

objFile.Close
Set objFile = Nothing
Set objFso = Nothing
%>

解説

Scripting.FileSystemObjectはファイル操作をするオブジェクトです。
WriteBlankLinesで指定された数の改行文字を書き込みます。


関連する内容



スポンサードリンク



Copyright (C) 2006-2008 ASP@Workshop All rights reserved.