本帖最后由 pcl_test 于 2016-1-11 01:47 编辑
- @echo off
- setlocal enabledelayedexpansion
- echo;正在处理数据中……
- for /f "tokens=1,2" %%a in (index.txt) do set #%%b=%%a&set n=%%b
- (for /f "tokens=1*" %%a in (Data.txt) do (
- set /p"=%%a "
- for %%c in (%%b) do set %%c=1
- for /l %%i in (1 1 %n%) do (
- for %%j in (!#%%i!) do (
- if defined %%j (
- set /p"=1[%%i][%%j] "
- rem 不显示[序号][Target_ID],上句改为set /p"=1 "
- set "%%j="
- ) else set /p"=0 "
- )
- )
- echo;
- ))<nul>out.txt
- pause
复制代码
|