1.变量延迟和变量替换
rem this batch is used to eliminate those unnecessary language tag
@echo off
setlocal
enabledelayedexpansion
for
/
r %%i in
(
*
.
xml
)
do
(
set
ke
=
%%i
rem
replace the by /
set
file
=
!ke:
=/
!
rem
agurments are bracked by "" in case of the backspace in the path
Xml2Xls
.
exe
"
!file!
"
"
!file!
"
)
pause
@echo off

















- @echo off
- set c=2
- set a=123
- call set b=%%a:~0,%c%%%
- echo %b%
- pause
-
- setlocal enabledelayedexpansion
- set b=!a:~0,%c%!
- echo !b!
- pause
4. ping遍局域网
- for /L %i in (1,1,255) do @ping -a 192.168.0.%i