批處理指令碼 - FIND



此批處理命令用來搜尋檔案或輸入中的字串,並輸出匹配行。

語法

FIND [text] [destination]

其中 text 為需要搜尋的字串,destination 為需要進行搜尋的源。

示例

@echo off 
FIND "Application" C:\tp\lists.txt

輸出

如果單詞“Application”存在於檔案 lists.txt 中,則包含該字串的行將顯示在命令提示符中。

batch_script_commands.htm
廣告