Dim tmp, path as String

path = "c:\xxx.txt" '定義路徑

tmp = File.ReadAllText(path) '讀取文字檔

InStr(tmp, "欲搜尋之字串") '文字搜尋

tmp = tmp.Replace("原字串", "欲比對字串") '字串比對

File.WriteAllText(path, tmp) '寫入文字檔

By Error001

文章標籤
全站熱搜
創作者介紹
創作者 nineaddnine 的頭像
nineaddnine

nineaddnine的部落格

nineaddnine 發表在 痞客邦 留言(0) 人氣(2)