
| Quote: | |
|
| Quote: | |
|
| Quote: | |
|
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard]:start
set n=0
set k=0
for /r E:\terry\test %%a in (*.txt) do (
set m=0
set /a n+=1
set tpath=%%~Fa
set fname=%%~na
setlocal enabledelayedexpansion
for /f "tokens=1 delims=-" %%b in ('findstr /i "\-beijing" "!tpath!"') do (
set temp=%%b
set /a m+=1
if !m! == 1 call :loop
cls
echo totally scan !n! files
echo totally find !k! beijing files
endlocal
)
pause
:loop
set /a K+=1&&echo !temp!>>E:\terry\beijing.txt&&move !tpath! E:\terry\beijing
goto :eof
附件 1:baijing.JPG (2008-10-25 15:01, 44.34 K,下载次数: 1)
![]()
CODE: [Copy to clipboard][ Last edited by moniuming on 2008-10-25 at 15:48 ]@echo off
for /r e:\terry\test %%a in (*.log) do (
set /a n+=1
call :countbj "%%a"
)
echo totally scan %n% files.
echo totally find %k% beijing files.
pause&goto :eof
:countbj
for /f %%a in ('findstr /i "beijing" %1') do (
set /a "k+=1"
goto :eof
)
CODE: [Copy to clipboard]for /f "delims=" %%i in ('findstr /i /s /m "createobject" E:\script\*.*') do (
set /a k+=1
echo move "%%i" E:\terry\beijing
)
echo %k%
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |