我是Windows批處理腳本的新手,但已經開始使用findstr命令,例如, findstr "test" file.txt
if not errorlevel 1 (echo Found it!)
代碼設法找到file.txttest但我不希望它輸出,其中發現「測試」我只是希望它呼應Found it! 行這可能與findstr或應我正在使用別的東西?
我想在JavaScript中逐行讀取本地文件。我可以檢查它是否到達這個文件的末尾。例如: file = new ActiveXObject("Scripting.FileSystemObject");
// Sets the variable "f" to equal the new open file contents
f = file.OpenTextFile("c:\\wantlis