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 

bat поиск слова в файле
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Total Commander Forum Index -> Автоматизация Total Commander printer-friendly view
View previous topic :: View next topic  
Author Message
EN88



Joined: 05 Jun 2011
Posts: 6

Post (Separately) Posted: Mon Jun 06, 2011 12:11    Post subject: Reply with quote

Собственно, вот работающий кусок. Делает то, что нужно.

Code:
dir c:\PATH1 /a:-d /s /b >_temp.txt
for /f %%a in ('type _temp.txt') do (
for /f %%b in ('findstr /m /c:"for" %%a') do (
xcopy %%a c:\PATH2
)
)
Back to top
View user's profile Send private message
MVV



Joined: 15 Oct 2009
Posts: 4811
Location: Ростов-Дон

Post (Separately) Posted: Mon Jun 06, 2011 12:40    Post subject: Reply with quote

По-моему, можн ещё упростить, склеив первые 2 строчки в одну:
Code:
for /f %%a in (`dir c:\PATH1 /a:-d /s /b`) do (

_________________
TCFS2 + TCFS2Tools: Полноэкранный режим и многое другое (обсуждение)
WINCMD.RU: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Автоматизация Total Commander All times are GMT + 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group