<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>サンプルコードで学ぶASP &#187; FileAccess</title>
	<atom:link href="http://asp.verygoodtown.com/category/reference/fileaccess/feed" rel="self" type="application/rss+xml" />
	<link>http://asp.verygoodtown.com</link>
	<description>レガシーなASPの使い方をコード付きで紹介します。</description>
	<lastBuildDate>Tue, 13 Apr 2010 02:25:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WriteLine</title>
		<link>http://asp.verygoodtown.com/2009/09/writeline</link>
		<comments>http://asp.verygoodtown.com/2009/09/writeline#comments</comments>
		<pubDate>Tue, 01 Sep 2009 01:45:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1157</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
WriteLine &#8212; ファイル書き込み処理
構文
object.WriteLine( [string] )
パラメータ

object
TextStream オブジェクトを指定します。 
string
書き込む文字列を指定します。

戻り値
値を返しません。
説明
指定した文字列と改行文字をファイルに書き込みます。
例
JScript
12345var fso, f;
fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;;
f = fso.CreateTextFile&#40;&#34;c:\\testfile.txt&#34;, true&#41;;
f.WriteLine&#40;&#34;これはテストです。&#34;&#41;;
f.Close&#40;&#41;;
VBScript
12345678910Function WriteLineToFile
&#160; &#160;Const ForReading = 1, ForWriting = 2
&#160; &#160;Dim fso, f
&#160; &#160;Set fso = CreateObject(&#34;Scripting.FileSystemObject&#34;)
&#160; &#160;Set f = fso.OpenTextFile(&#34;c:\testfile.txt&#34;, ForWriting, True)
&#160; &#160;f.WriteLine &#34;Hello world!&#34;
&#160; &#160;f.WriteLine &#34;これはテストです。&#34;
&#160; &#160;Set f = fso.OpenTextFile(&#34;c:\testfile.txt&#34;, ForReading)
&#160; &#160;WriteLineToFile = f.ReadAll
End Function
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
WriteLine &#8212; ファイル書き込み処理</p>
<h3>構文</h3>
<p>object.<strong>WriteLine</strong>( [string] )</p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
<dt>string</dt>
<dd>書き込む文字列を指定します。</dd>
</dl>
<h3>戻り値</h3>
<p>値を返しません。</p>
<h3>説明</h3>
<p>指定した文字列と改行文字をファイルに書き込みます。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">,</span> f<span style="color: #339933;">;</span><br />
fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">CreateTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
f.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;これはテストです。&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
f.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Function</span> WriteLineToFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Const</span> ForReading = 1, ForWriting = 2<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, f<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForWriting, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;f.WriteLine <span style="color: #800000;">&quot;Hello world!&quot;</span><br />
&nbsp; &nbsp;f.WriteLine <span style="color: #800000;">&quot;これはテストです。&quot;</span><br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForReading)<br />
&nbsp; &nbsp;WriteLineToFile = f.ReadAll<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/09/writeline/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WriteBlankLines</title>
		<link>http://asp.verygoodtown.com/2009/09/writeblanklines</link>
		<comments>http://asp.verygoodtown.com/2009/09/writeblanklines#comments</comments>
		<pubDate>Tue, 01 Sep 2009 01:43:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1155</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
WriteBlankLines &#8212; ファイルに改行の書き込み処理
構文
object.WriteBlankLines ( lines )
パラメータ

object
TextStream オブジェクトを指定します。 
lines
書き込む改行の数を指定します。

戻り値
値を返しません。
説明
指定された数の改行文字をファイルに書き込みます。
例
JScript
1234567891011121314function WriteBlanksDemo&#40;&#41;
&#123;
&#160; &#160;var fso, f, r;
&#160; &#160;var ForReading = 1, ForWriting = 2;
&#160; &#160;fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForWriting, true&#41;;
&#160; &#160;f.Write&#40;&#34;Hello world!&#34;&#41;;
&#160; &#160;f.WriteBlankLines&#40;2&#41;;
&#160; &#160;f.Write&#40;&#34;JScript is fun!&#34;&#41;;
&#160; &#160;f.Close&#40;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForReading&#41;;
&#160; &#160;r = f.ReadAll&#40;&#41;;
&#160; &#160;return&#40;r&#41;;
&#125;
VBScript
12345678910Function WriteBlankLinesToFile
&#160; &#160;Const ForReading = 1, ForWriting = 2
&#160; &#160;Dim [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
WriteBlankLines &#8212; ファイルに改行の書き込み処理</p>
<h3>構文</h3>
<p>object.<strong>WriteBlankLines</strong> ( lines )</p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
<dt>lines</dt>
<dd>書き込む改行の数を指定します。</dd>
</dl>
<h3>戻り値</h3>
<p>値を返しません。</p>
<h3>説明</h3>
<p>指定された数の改行文字をファイルに書き込みます。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> WriteBlanksDemo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">,</span> f<span style="color: #339933;">,</span> r<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> ForReading <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> ForWriting <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForWriting<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066; font-weight: bold;">Write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello world!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">WriteBlankLines</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066; font-weight: bold;">Write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;JScript is fun!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForReading<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;r <span style="color: #339933;">=</span> f.<span style="color: #660066;">ReadAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">return</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Function</span> WriteBlankLinesToFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Const</span> ForReading = 1, ForWriting = 2<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, f<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForWriting, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;f.WriteBlankLines 2<br />
&nbsp; &nbsp;f.WriteLine <span style="color: #800000;">&quot;Hello World!&quot;</span><br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForReading)<br />
&nbsp; &nbsp;WriteBlankLinesToFile = f.ReadAll<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/09/writeblanklines/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write</title>
		<link>http://asp.verygoodtown.com/2009/09/write-3</link>
		<comments>http://asp.verygoodtown.com/2009/09/write-3#comments</comments>
		<pubDate>Tue, 01 Sep 2009 01:40:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1152</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Write &#8212; ファイル書き込み処理
構文
object.Write ( string )
パラメータ

object
TextStream オブジェクトを指定します。 
string
書き込む文字列を指定します。

戻り値
値を返しません。
説明
指定した文字列を ファイルに書き込みます。
連続して文字列を書き込んだ場合、文字列間にスペースや区切り文字は挿入されず、続けて書き込まれます。
文字列の最後で改行する必要がある場合は、WriteLine メソッドを使用するかまたは文字列の最後に改行文字を入れてください。
例
JScript
123456789101112function WriteDemo&#40;&#41;
&#123;
&#160; &#160;var fso, f, r
&#160; &#160;var ForReading = 1, ForWriting = 2;
&#160; &#160;fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForWriting, true&#41;
&#160; &#160;f.Write&#40;&#34;Hello world!&#34;&#41;;
&#160; &#160;f.Close&#40;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForReading&#41;;
&#160; &#160;r = f.ReadLine&#40;&#41;;
&#160; &#160;return&#40;r&#41;;
&#125;
VBScript
123456789Function WriteToFile
&#160; &#160;Const ForReading = 1, ForWriting = 2
&#160; &#160;Dim fso, f
&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Write &#8212; ファイル書き込み処理</p>
<h3>構文</h3>
<p>object.<strong>Write</strong> ( string )</p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
<dt>string</dt>
<dd>書き込む文字列を指定します。</dd>
</dl>
<h3>戻り値</h3>
<p>値を返しません。</p>
<h3>説明</h3>
<p>指定した文字列を ファイルに書き込みます。<br />
連続して文字列を書き込んだ場合、文字列間にスペースや区切り文字は挿入されず、続けて書き込まれます。<br />
文字列の最後で改行する必要がある場合は、WriteLine メソッドを使用するかまたは文字列の最後に改行文字を入れてください。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> WriteDemo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">,</span> f<span style="color: #339933;">,</span> r<br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> ForReading <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> ForWriting <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForWriting<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066; font-weight: bold;">Write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello world!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForReading<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;r <span style="color: #339933;">=</span> f.<span style="color: #660066;">ReadLine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">return</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Function</span> WriteToFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Const</span> ForReading = 1, ForWriting = 2<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, f<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForWriting, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;f.Write <span style="color: #800000;">&quot;Hello world!&quot;</span><br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForReading)<br />
&nbsp; &nbsp;WriteToFile = &nbsp; f.ReadLine<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/09/write-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SkipLine</title>
		<link>http://asp.verygoodtown.com/2009/09/skipline-2</link>
		<comments>http://asp.verygoodtown.com/2009/09/skipline-2#comments</comments>
		<pubDate>Tue, 01 Sep 2009 01:37:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1148</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
SkipLine &#8212; 次の1行をスキップする
構文
object.SkipLine
パラメータ

object
TextStream オブジェクトを指定します。 

戻り値
値を返しません。
説明
ファイルを読み込むときに次の行をスキップします。
例
JScript
1234567891011121314function SkipLineDemo&#40;&#41;
&#123;
&#160; &#160;var fso, f, r
&#160; &#160;var ForReading = 1, ForWriting = 2;
&#160; &#160;fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForWriting, true&#41;
&#160; &#160;f.WriteLine&#40;&#34;Hello world!&#34;&#41;;
&#160; &#160;f.WriteLine&#40;&#34;JScript is fun&#34;&#41;;
&#160; &#160;f.Close&#40;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForReading&#41;;
&#160; &#160;f.SkipLine&#40;&#41;;
&#160; &#160;r = f.ReadLine&#40;&#41;;
&#160; &#160;return&#40;r&#41;;
&#125;
VBScript
12345678910Function SkipLineInFile
&#160; &#160;Const ForReading = 1, ForWriting = 2
&#160; &#160;Dim fso, f
&#160; &#160;Set [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
SkipLine &#8212; 次の1行をスキップする</p>
<h3>構文</h3>
<p>object.<strong>SkipLine</strong></p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
</dl>
<h3>戻り値</h3>
<p>値を返しません。</p>
<h3>説明</h3>
<p>ファイルを読み込むときに次の行をスキップします。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> SkipLineDemo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">,</span> f<span style="color: #339933;">,</span> r<br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> ForReading <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> ForWriting <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForWriting<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello world!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;JScript is fun&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForReading<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">SkipLine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;r <span style="color: #339933;">=</span> f.<span style="color: #660066;">ReadLine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">return</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Function</span> SkipLineInFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Const</span> ForReading = 1, ForWriting = 2<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, f<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForWriting, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;f.Write <span style="color: #800000;">&quot;Hello world!&quot;</span> &amp; vbCrLf &amp; <span style="color: #800000;">&quot;VB Script is fun!&quot;</span><br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForReading)<br />
&nbsp; &nbsp;f.SkipLine<br />
&nbsp; &nbsp;SkipLineInFile = f.ReadLine<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/09/skipline-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skip</title>
		<link>http://asp.verygoodtown.com/2009/09/skip</link>
		<comments>http://asp.verygoodtown.com/2009/09/skip#comments</comments>
		<pubDate>Tue, 01 Sep 2009 01:35:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1146</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Skip &#8212; 文字をスキップします
構文
object.Skip ( characters )
パラメータ

object
TextStream オブジェクトを指定します。 
characters
読み飛ばす文字数 

戻り値
値を返しません。
説明
ファイルを読み込むときに指定された数の文字数をスキップします。
スキップした文字列は、破棄されます。
例
JScript
1234567891011121314function SkipDemo&#40;&#41;
&#123;
&#160; &#160;var fso, f, r;
&#160; &#160;var ForReading = 1, ForWriting = 2;
&#160; &#160;fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForWriting, true&#41;;
&#160; &#160;f.WriteLine&#40;&#34;Hello world!&#34;&#41;;
&#160; &#160;f.WriteLine&#40;&#34;JScript is fun&#34;&#41;;
&#160; &#160;f.Close&#40;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForReading&#41;;
&#160; &#160;f.Skip&#40;6&#41;;
&#160; &#160;r = f.ReadLine&#40;&#41;;
&#160; &#160;return&#40;r&#41;;
&#125;
VBScript
12345678910Function SkipTextFile
&#160; &#160;Const ForReading = 1, ForWriting = 2
&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Skip &#8212; 文字をスキップします</p>
<h3>構文</h3>
<p>object.<strong>Skip</strong> ( characters )</p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
<dt>characters</dt>
<dd>読み飛ばす文字数 </dd>
</dl>
<h3>戻り値</h3>
<p>値を返しません。</p>
<h3>説明</h3>
<p>ファイルを読み込むときに指定された数の文字数をスキップします。<br />
スキップした文字列は、破棄されます。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> SkipDemo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">,</span> f<span style="color: #339933;">,</span> r<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> ForReading <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> ForWriting <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForWriting<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello world!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;JScript is fun&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForReading<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">Skip</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">6</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;r <span style="color: #339933;">=</span> f.<span style="color: #660066;">ReadLine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">return</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Function</span> SkipTextFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Const</span> ForReading = 1, ForWriting = 2<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, f<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForWriting, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;f.Write <span style="color: #800000;">&quot;Hello world!&quot;</span><br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForReading)<br />
&nbsp; &nbsp;f.Skip(6)<br />
&nbsp; &nbsp;SkipTextFile = &nbsp; f.ReadLine<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/09/skip/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ReadLine</title>
		<link>http://asp.verygoodtown.com/2009/09/readline</link>
		<comments>http://asp.verygoodtown.com/2009/09/readline#comments</comments>
		<pubDate>Tue, 01 Sep 2009 01:32:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1143</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
ReadLine &#8212; ファイルポインタから 1 行取得する
構文
object.ReadLine
パラメータ

object
TextStream オブジェクトを指定します。 

戻り値
読み込んだ文字列を返します。
説明
TextStream ファイルから 1 行 ( 改行文字を除く ) を読み込み、その結果の文字列を返します。
例
JScript
12345678910111213function GetLine&#40;&#41;
&#123;
&#160; &#160;var fso, f, r;
&#160; &#160;var ForReading = 1, ForWriting = 2;
&#160; &#160;fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForWriting, true&#41;;
&#160; &#160;f.WriteLine&#40;&#34;Hello world!&#34;&#41;;
&#160; &#160;f.WriteLine&#40;&#34;JScript is fun&#34;&#41;;
&#160; &#160;f.Close&#40;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForReading&#41;;
&#160; &#160;r = &#160;f.ReadLine&#40;&#41;;
&#160; &#160;return&#40;r&#41;;
&#125;
VBScript
1234567891011Function ReadLineTextFile
&#160; &#160;Const ForReading = [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
ReadLine &#8212; ファイルポインタから 1 行取得する</p>
<h3>構文</h3>
<p>object.<strong>ReadLine</strong></p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
</dl>
<h3>戻り値</h3>
<p>読み込んだ文字列を返します。</p>
<h3>説明</h3>
<p>TextStream ファイルから 1 行 ( 改行文字を除く ) を読み込み、その結果の文字列を返します。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> GetLine<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">,</span> f<span style="color: #339933;">,</span> r<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> ForReading <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> ForWriting <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForWriting<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello world!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;JScript is fun&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForReading<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;r <span style="color: #339933;">=</span> &nbsp;f.<span style="color: #660066;">ReadLine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">return</span><span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Function</span> ReadLineTextFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Const</span> ForReading = 1, ForWriting = 2<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, MyFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> MyFile = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForWriting, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;MyFile.WriteLine <span style="color: #800000;">&quot;Hello world!&quot;</span><br />
&nbsp; &nbsp;MyFile.WriteLine <span style="color: #800000;">&quot;The quick brown fox&quot;</span><br />
&nbsp; &nbsp;MyFile.<span style="color: #000080;">Close</span><br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> MyFile = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForReading)<br />
&nbsp; &nbsp;ReadLineTextFile = MyFile.ReadLine &nbsp; &nbsp;<span style="color: #008000;">' Returns &quot;Hello world!&quot;<br />
</span><span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/09/readline/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ReadAll</title>
		<link>http://asp.verygoodtown.com/2009/09/readall</link>
		<comments>http://asp.verygoodtown.com/2009/09/readall#comments</comments>
		<pubDate>Tue, 01 Sep 2009 01:28:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1141</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
ReadAll &#8212; ファイルの読み込み
構文
object.ReadAll
パラメータ

object
TextStream オブジェクトを指定します。 

戻り値
読み込んだ文字列を返します。
説明
TextStream ファイル全体を読み込み、その結果の文字列を返します。
サイズの大きいファイルで ReadAll メソッドを使用すると、多くのメモリ リソースを消費します。サイズの大きいファイルを扱うときは、ファイルから 1 行ずつ読み込む方法を使用することをお勧めします。
例
JScript
123456789101112function GetEverything&#40;&#41;
&#123;
&#160; &#160;var fso, f;
&#160; &#160;var ForReading = 1, ForWriting = 2;
&#160; &#160;fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForWriting, true&#41;;
&#160; &#160;f.Write&#40;&#34;Header&#34;&#41;;
&#160; &#160;f.Write&#40;&#34;1234567890987654321&#34;&#41;;
&#160; &#160;f.Close&#40;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForReading&#41;;
&#160; &#160;return&#40;f.ReadAll&#40;&#41;&#41;;
&#125;
VBScript
123456789Function ReadAllTextFile
&#160; &#160;Const ForReading = 1, ForWriting = 2
&#160; &#160;Dim fso, f
&#160; &#160;Set fso = [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
ReadAll &#8212; ファイルの読み込み</p>
<h3>構文</h3>
<p>object.<strong>ReadAll</strong></p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
</dl>
<h3>戻り値</h3>
<p>読み込んだ文字列を返します。</p>
<h3>説明</h3>
<p>TextStream ファイル全体を読み込み、その結果の文字列を返します。</p>
<p>サイズの大きいファイルで ReadAll メソッドを使用すると、多くのメモリ リソースを消費します。サイズの大きいファイルを扱うときは、ファイルから 1 行ずつ読み込む方法を使用することをお勧めします。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> GetEverything<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">,</span> f<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> ForReading <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> ForWriting <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForWriting<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066; font-weight: bold;">Write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Header&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066; font-weight: bold;">Write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;1234567890987654321&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForReading<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">return</span><span style="color: #009900;">&#40;</span>f.<span style="color: #660066;">ReadAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Function</span> ReadAllTextFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Const</span> ForReading = 1, ForWriting = 2<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, f<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForWriting, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;f.Write <span style="color: #800000;">&quot;Hello world!&quot;</span><br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForReading)<br />
&nbsp; &nbsp;ReadAllTextFile = &nbsp; f.ReadAll<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/09/readall/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read</title>
		<link>http://asp.verygoodtown.com/2009/08/read-2</link>
		<comments>http://asp.verygoodtown.com/2009/08/read-2#comments</comments>
		<pubDate>Mon, 31 Aug 2009 11:46:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1139</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Read &#8212; ファイルの読み込み
構文
object.Read( characters )
パラメータ

object
TextStream オブジェクトを指定します。 
characters
読み込む文字数を指定します。

戻り値
読み込んだ文字列 を返します。
説明
ファイルから指定された文字数を読み込み、その結果の文字列を返します。
例
JScript
123456789101112function GetHeader&#40;&#41;
&#123;
&#160; &#160;var fso, f;
&#160; &#160;var ForReading = 1, ForWriting = 2;
&#160; &#160;fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForWriting, true&#41;;
&#160; &#160;f.Write&#40;&#34;Header&#34;&#41;;
&#160; &#160;f.Write&#40;&#34;1234567890987654321&#34;&#41;;
&#160; &#160;f.Close&#40;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\testfile.txt&#34;, ForReading&#41;;
&#160; &#160;return&#40;f.Read&#40;6&#41;&#41;;
&#125;
VBScript
123456789Function ReadTextFileTest
&#160; &#160;Const ForReading = 1, ForWriting = 2, ForAppending = 8
&#160; &#160;Dim fso, f, Msg
&#160; &#160;Set fso [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Read &#8212; ファイルの読み込み</p>
<h3>構文</h3>
<p>object.<strong>Read</strong>( characters )</p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
<dt>characters</dt>
<dd>読み込む文字数を指定します。</dd>
</dl>
<h3>戻り値</h3>
<p>読み込んだ文字列 を返します。</p>
<h3>説明</h3>
<p>ファイルから指定された文字数を読み込み、その結果の文字列を返します。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> GetHeader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">,</span> f<span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> ForReading <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> ForWriting <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForWriting<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066; font-weight: bold;">Write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Header&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066; font-weight: bold;">Write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;1234567890987654321&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> ForReading<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">return</span><span style="color: #009900;">&#40;</span>f.<span style="color: #660066;">Read</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">6</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Function</span> ReadTextFileTest<br />
&nbsp; &nbsp;<span style="color: #000080;">Const</span> ForReading = 1, ForWriting = 2, ForAppending = 8<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, f, Msg<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForWriting, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;f.Write <span style="color: #800000;">&quot;Hello world!&quot;</span><br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForReading)<br />
&nbsp; &nbsp;ReadTextFileTest = f.Read(5)<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/read-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Close</title>
		<link>http://asp.verygoodtown.com/2009/08/close-5</link>
		<comments>http://asp.verygoodtown.com/2009/08/close-5#comments</comments>
		<pubDate>Mon, 31 Aug 2009 02:30:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1135</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Close &#8212; 開いた状態の TextStream ファイルを閉じます。
構文
object.Close
パラメータ

object
TextStream オブジェクトを指定します。 

戻り値
値を返しません。
説明
ファイルを閉じます。
例
JScript
12345var fso;
fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;;
a = fso.CreateTextFile&#40;&#34;c:\\testfile.txt&#34;, true&#41;;
a.WriteLine&#40;&#34;これはテストです。&#34;&#41;;
a.Close&#40;&#41;;
VBScript
1234567Sub CreateAFile
&#160; &#160;Dim fso, MyFile
&#160; &#160;Set fso = CreateObject(&#34;Scripting.FileSystemObject&#34;)
&#160; &#160;Set MyFile = fso.CreateTextFile(&#34;c:\testfile.txt&#34;, True)
&#160; &#160;MyFile.WriteLine(&#34;これはテストです。&#34;)
&#160; &#160;MyFile.Close
End Sub
]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Close &#8212; 開いた状態の TextStream ファイルを閉じます。</p>
<h3>構文</h3>
<p>object.<strong>Close</strong></p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
</dl>
<h3>戻り値</h3>
<p>値を返しません。</p>
<h3>説明</h3>
<p>ファイルを閉じます。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">;</span><br />
fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
a <span style="color: #339933;">=</span> fso.<span style="color: #660066;">CreateTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>testfile.txt&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
a.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;これはテストです。&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
a.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Sub</span> CreateAFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, MyFile<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> MyFile = fso.CreateTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;MyFile.WriteLine(<span style="color: #800000;">&quot;これはテストです。&quot;</span>)<br />
&nbsp; &nbsp;MyFile.<span style="color: #000080;">Close</span><br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/close-5/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Line</title>
		<link>http://asp.verygoodtown.com/2009/08/line-2</link>
		<comments>http://asp.verygoodtown.com/2009/08/line-2#comments</comments>
		<pubDate>Mon, 31 Aug 2009 02:29:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TextStream オブジェクト]]></category>

		<guid isPermaLink="false">http://asp.verygoodtown.com/?p=1133</guid>
		<description><![CDATA[(PWS4 IIS4 IIS5)
Line &#8212; TextStream ファイル内での現在の行番号を返します。値の取得のみ可能です。
構文
object.Line
パラメータ

object
TextStream オブジェクトを指定します。 

戻り値
現在の行番号を返します。
説明
ファイルを開いた後、何も書き込んでいない状態での Line プロパティの値は 1 です。
例
JScript
12345678910111213function GetLine&#40;&#41;
&#123;
&#160; &#160;var fso, f, r
&#160; &#160;var ForReading = 1, ForWriting = 2;
&#160; &#160;fso = new ActiveXObject&#40;&#34;Scripting.FileSystemObject&#34;&#41;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\textfile.txt&#34;, ForWriting, true&#41;
&#160; &#160;f.WriteLine&#40;&#34;Hello world!&#34;&#41;;
&#160; &#160;f.WriteLine&#40;&#34;JScript is fun&#34;&#41;;
&#160; &#160;f.Close&#40;&#41;;
&#160; &#160;f = fso.OpenTextFile&#40;&#34;c:\\textfile.txt&#34;, ForReading&#41;;
&#160; &#160;r = &#160; f.ReadAll&#40;&#41;;
&#160; &#160;return&#40;f.Line&#41;;
&#125;
VBScript
12345678910Function GetLine
&#160; &#160;Const ForReading = 1, ForWriting = [...]]]></description>
			<content:encoded><![CDATA[<p>(PWS4 IIS4 IIS5)<br />
Line &#8212; TextStream ファイル内での現在の行番号を返します。値の取得のみ可能です。</p>
<h3>構文</h3>
<p>object.<strong>Line</strong></p>
<h3>パラメータ</h3>
<dl>
<dt>object</dt>
<dd>TextStream オブジェクトを指定します。 </dd>
</dl>
<h3>戻り値</h3>
<p>現在の行番号を返します。</p>
<h3>説明</h3>
<p>ファイルを開いた後、何も書き込んでいない状態での Line プロパティの値は 1 です。</p>
<h3>例</h3>
<p>JScript</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> GetLine<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> fso<span style="color: #339933;">,</span> f<span style="color: #339933;">,</span> r<br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> ForReading <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> ForWriting <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;fso <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>textfile.txt&quot;</span><span style="color: #339933;">,</span> ForWriting<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello world!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #660066;">WriteLine</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;JScript is fun&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f.<span style="color: #000066;">Close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;f <span style="color: #339933;">=</span> fso.<span style="color: #660066;">OpenTextFile</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>textfile.txt&quot;</span><span style="color: #339933;">,</span> ForReading<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;r <span style="color: #339933;">=</span> &nbsp; f.<span style="color: #660066;">ReadAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">return</span><span style="color: #009900;">&#40;</span>f.<span style="color: #660066;">Line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>VBScript</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Function</span> GetLine<br />
&nbsp; &nbsp;<span style="color: #000080;">Const</span> ForReading = 1, ForWriting = 2<br />
&nbsp; &nbsp;<span style="color: #000080;">Dim</span> fso, f, ra<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> fso = CreateObject(<span style="color: #800000;">&quot;Scripting.FileSystemObject&quot;</span>)<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForWriting, <span style="color: #000080;">True</span>)<br />
&nbsp; &nbsp;f.Write <span style="color: #800000;">&quot;Hello world!&quot;</span> &amp; vbCrLf &amp; <span style="color: #800000;">&quot;VB Script is fun!&quot;</span> &amp; vbCrLf<br />
&nbsp; &nbsp;<span style="color: #000080;">Set</span> f = fso.OpenTextFile(<span style="color: #800000;">&quot;c:\testfile.txt&quot;</span>, ForReading)<br />
&nbsp; &nbsp;ra = &nbsp; f.ReadAll<br />
&nbsp; &nbsp;GetLine = f.<span style="color: #000080;">Line</span><br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://asp.verygoodtown.com/2009/08/line-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

