當然不是的 因為 > 被用來當作寫檔的功能,正確的指令 倒是不知道

如: 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

If Command Extensions are enabled IF changes as follows:

IF [/I] string1 compare-op string2 command
IF CMDEXTVERSION number command
IF DEFINED variable command

where compare-op may be one of:

EQU - equal

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