2018年07月03日 17:15
dir = "C:\Users\{ユーザー名}\Desktop\"
files = "*.txt"
//検索する文字
search_str = "こんにちは"
For i=0 to GETDIR(dir, files)-1
ID = FOPEN("" + dir + GETDIR_FILES[i] + "", F_READ)
For j=1 to FGET(ID, -1)
//テキストファイルの1行の内容
content = FGET(ID, j)
ret = POS(search_str, content)
if ret > 0 then
print GETDIR_FILES[i] + ":" + j
break
endif
next
FCLOSE(ID)
next