http://www.pczone.com.tw/vbb3/archive/t-101812.html
大家好~
例如 net, xcopy, regedit
這些指令,
試過很多次, 有的電腦要打 —
%SYSTEMROOT%\system32\net use p: ...
%SYSTEMROOT%\regedit /s p:\xxx.reg
不然會出現 "xx 不是內部或外部指令 …"
反正就是 bad command or file name 的意思
可是有的電腦卻又不用打路徑~
ulimie 2004-09-25, 12:37 PM
下個 path 的命令就知, 在 path 裡的指令, 前面就不必加路徑.
path 是可以自已改訂的.
:: Send the length of the variable %MyVar%
:: to the variable %length%
set kk=%mon%
set length=0
:loop
if defined kk (set kk=%kk:~1%&set /A length += 1&goto loop)
echo %length%
http://www.computing.net/answers/dos/length-of-a-string-in-a-batch-file/13650.html