image
Batch裡面可以寫『FUNCTION?   不就是:LABEL  使用GOTO呼叫嗎?
喔 若是還可以傳參數呢? :LABEL 就不行吧

味味A 發表在 痞客邦 留言(0) 人氣()

今天有客戶 詢問register匯入 都會問 是否匯入的惱人視窗,可否關閉。 我一聽 不就是regedit.exe 加 /s嗎? 結果 我一試 regedit.exe test.reg /s ....... 怎麼不行......原來 參數的順序有差別
Import (merge) a .REG file:
    REGEDIT.EXE [ /L:system | /R:user ] [ /S ] importfile.REG

味味A 發表在 痞客邦 留言(0) 人氣()

參考MS official web site:Findstr.....
Regular Expressions (Searching for patterns of text)




Character




Value






.




Wildcard: any character
搜尋任意字串(不含空字串或空白行)






*




Repeat: zero or more occurrences of previous character or class






^




Line position: beginning of line


找出每行開頭,符合指定的字串






$




Line position: end of line


找出每行結尾,符合指定的字串






[class]




Character class: any one character in set


找出符合[]內之字元資料。






[^class]




Inverse class: any one character not in set


相反於[class]的結果,就是不在集合內的內容才符合。






[X-y]




Range: any characters within the specified range


找出符合[]內之起迄字元資料 (符合之一即是)。[0-9][A-Za-z]。






\X




Escape: literal use of metacharacter X


這個功能尚未明瞭….。






\<xyz




Word position: beginning of word


找符合英文字開頭,例: \<wor 可找到hello world






xyz\>




Word position: end of word


找符合英文字結尾,例: \<lo 可找到hello  world





味味A 發表在 痞客邦 留言(1) 人氣()


Batch下比較檔案,試了很多方法: 1.比較檔案日期(但取不到日期) 2.比較檔案size(但指令看起來比較複雜) 3.FC.EXE =>比較兩個檔案或兩組檔案並且顯示其中的不同之處。
    (是系統指令,XP,win2000都存在c:\windows\system32\下)

味味A 發表在 痞客邦 留言(0) 人氣()

當然不是的 因為 > 被用來當作寫檔的功能,正確的指令 倒是不知道 如: DIR/W >C:\AA.LOG 依參考下面文章 來源:http://www.computerhope.com/if.htm The below example would work if you want it all on one line: IF EXIST filename. (del filename.) ELSE echo filename. missing

味味A 發表在 痞客邦 留言(0) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。