Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Создание файлов с форматированием текста из других файлов 
Author Message
Tol!k



PostPosted: Mon Jun 21, 2010 21:10    Post subject: Reply with quote

M.cmd:
Code:
@echo off &chcp 1251 >nul
setlocal enableextensions
set /a s=0
for /f "tokens=2 delims==" %%a in ('findstr /b /r /c:[0-9]*= "A.txt"') do call :s %%a
set /a s=0
for /f "usebackq delims=" %%a in ("N.txt") do call :o %%a
endlocal
goto :eof

:s
set /a s+=1 &set str%s%=%1
goto :eof

:o
set /a s+=1 &call echo %1=%%str%s%%%>> "M.txt"
goto :eof

Note:
в A.txt и B.txt строки должны соответствовать;
в A.txt не должно быть лишних строк (д.б. ровно сколько в N.txt)


Last edited by Tol!k on Mon Jun 21, 2010 23:34; edited 2 times in total
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group