本帖最后由 tmplinshi 于 2012-11-17 17:32 编辑
- @echo off
- setlocal enabledelayedexpansion
- for /f "tokens=*" %%a in (a.txt) do (
- set n=0
- set str=%%a
- set str=!str:,=" "!
- for %%b in ("!str!") do (
- set /a n += 1
- for %%c in ("!n!") do (
- set _!n!=!_%%~c!%%~b
- )
- )
- )
-
- for /l %%a in (1 1 !n!) do echo,!_%%a!
-
- pause
复制代码
|