![](/img/trans.png)
[英]Make a batch file that will first ping an IP address and verify it's not used before setting the IP address of the IPv4 “Local Area Connection”
[英]Batch Script to get a IPV4 address of a computer then if the IP is within a range run a batch file
我正在嘗試使此批處理文件正常工作。 有2個IP范圍需要檢查。
10.0.50.xxx 10.0.60.xxx
到目前為止,我沒有成功。
[回滾到原始狀態-OP還對匹配字符串中的*
做過實驗]
ipconfig | find /i "IPv4 Address. . . . . . . . . . . : 10.0.50." >nul 2>nul && (
call script.bat
) || (
ipconfig | find /i "IPv4 Address. . . . . . . . . . . : 10.0.6." >nul 2>nul && (
call script2.bat
) || (
exit
任何幫助將非常感激。
這樣合適嗎
IPConfig|FindStr/IRC:"IPv4 .*: 10.0.50.">Nul 2>&1 && (Call script.bat) || (
IPConfig|FindStr/IRC:"IPv4 .*: 10.0.60.">Nul 2>&1 && Call script2.bat)
恐怕未經測試
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.