本帖最后由 flyinnet9 于 2015-9-21 17:17 编辑
如果没有空格的话- @echo off
- for /f "delims=" %%a in (1.txt) do set str=%%a
- set str=%str:;= %
- for %%a in (%str%) do echo %%a
复制代码 有空格- @echo off
- setlocal enabledelayedexpansion
- for /f "delims=" %%a in (list.txt) do set str=%%a
- set "str=%str:;=","%"
- set str="!str!"
- for %%a in (%str%) do echo %%a
复制代码
|