本帖最后由 77七 于 2024-7-23 15:52 编辑
回复 57# ppll2030
去掉就行,提供两种方法...
- @echo off
- set "str= 1 2 3 * ? "
- set "str=x %str%"
- set "str=%str: =&echo;%"
- for /f "skip=1" %%a in ('echo %%str%%') do (
- echo [%%a]
- )
- pause
- for /f "tokens=*" %%a in (" 1 2 3 * ? ") do (
- set str=%%a
- if defined str (
- call set "str=%%str: =&echo;%%"
- for /f %%a in ('call echo %%str%%') do (
- echo [%%a]
- )
- )
- )
- pause
复制代码
|