2017年12月14日 09:46
path = "C:\Users\{ユーザー名}\Desktop\"
files = "*.txt"
//検索する文字列
search_str = "こんにちは"
//置換する文字列
rep_str = "Hello"
for i=0 to GETDIR(path, files)-1
ID = FOPEN("" + path + GETDIR_FILES[i] + "", F_READ or F_WRITE)
//テキストファイルの全内容を取得する
content = FGET(ID, F_ALLTEXT)
rep_content = REPLACE(content, search_str, rep_str)
FPUT(ID, rep_content, F_ALLTEXT)
FCLOSE(ID)
next