Java活用生活

ログイン

オンライン状況

オンラインユーザー1人
ログインユーザー0人
登録ユーザー2人

カウンタ

COUNTER335483

日誌

Web Master >> 記事詳細
2023/01/30

VBScript ファイルの読み込み

固定リンク | by:aramaki
VBScript ファイルの読み込み
--------------------------------------
Option Explicit


Dim objFSO
Dim objFile
Dim arrLines
Dim cnt
Dim strTemp
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("E:\data.txt")

'Do While objFile.AtEndOfLine <> True
Do Until objFile.AtEndOfStream
    arrLines = objFile.ReadLine
    strTemp = Mid(arrLines,12,2)
    MsgBox strTemp
    If(strTemp="12") Then
    cnt = cnt + 1
    End If
Loop
WScript.Echo cnt

objFile.close()
Set objFile = Nothing

'ファイルシステムオブジェクトの破棄
objFSO = Nothing
21:06 | 投票する | 投票数(0) | コメント(0)
Copyright © Java活用生活 All Rights Reserved .