0013__for /f命令之—Delims和Tokens用法&总结

:cpcodeselection :startcode for /f "tokens=2,* delims=:" %%i in (CPMODE.ini) do (call :rbspace %%i)&(goto endcode) :endcode set STC=%str% for /f "skip=1 tokens=2,* delims=:" %%i in (CPMODE.ini) do (call :rbspace %%i)&(goto oreceive) :oreceive set ENC=%str% for /f "skip=2 tokens=2,* delims=:" %%i in (CPMODE.ini) do (call :rbspace %%i)&(goto creceive) :creceive set OR=%str% for /f "skip=3 tokens=2,* delims=:" %%i in (CPMODE.ini) do (call :rbspace %%i)&(goto cpcodeok) :cpcodeok set CR=%str% if '%1%' equ '' goto scpcsok if '%1%' neq '' goto pcpcsok :cpmode set /a ARG=%1%+3 goto cpcodeselection :pcpcsok for /f "skip=%ARG% tokens=2,* delims=:" %%i in (CPMODE.ini) do (call :rbspace %%i)&(goto ptrigger) :ptrigger set CP=%str% pcomp -p %CP% %STC% -d -h -v %OR% -o temp.txt wfileman /get5 temp.txt , 0 1 /fo sn_temp%1%.txt rem pcomp -p %CP% %ENC% -d -h -v %CR% if exist temp.txt type nul> sn_temp%1%.sync if exist temp.txt del temp.txt /f goto finish :single goto cpcodeselection :scpcsok enumdevs_wxp86 > s1.txt wfileman /rng_del s1.txt 0 0 29 29 s2.txt wfileman /sget5 s2.txt "USB Serial Port" 1 (COM 1 /senv com_no setcomno.bat call setcomno.bat pcomp -p %com_no% %STC% -d -h -v %OR% -o temp.txt wfileman /get5 temp.txt , 0 1 /fo sn_temp.txt rem pcomp -p %com_no% %ENC% -d -h -v %CR% if exist temp.txt type nul> sn_temp.sync if exist temp.txt del temp.txt /f if exist s1.txt del s1.txt /f if exist s2.txt del s2.txt /f if exist setcomno.bat del setcomno.bat /f goto finish
最新发布
04-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值