Dim tmp, path as String
path = "c:\xxx.txt" '定義路徑
tmp = File.ReadAllText(path) '讀取文字檔
InStr(tmp, "欲搜尋之字串") '文字搜尋
tmp = tmp.Replace("原字串", "欲比對字串") '字串比對
File.WriteAllText(path, tmp) '寫入文字檔
By Error001
文章標籤
全站熱搜
Dim tmp, path as String
path = "c:\xxx.txt" '定義路徑
tmp = File.ReadAllText(path) '讀取文字檔
InStr(tmp, "欲搜尋之字串") '文字搜尋
tmp = tmp.Replace("原字串", "欲比對字串") '字串比對
File.WriteAllText(path, tmp) '寫入文字檔
By Error001