你是怎么改的?代码贴出来
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off
setlocal enabledelayedexpansion
for /f "tokens=*" %%a in ('dir /b /tc /o-d /a *.txt') do (
set NewFile=%%a
goto :next
)
:next
set str=
for /f "usebackq delims=" %%i in ("%NewFile%") do (
for %%j in (%%i) do (
set str=%%j
if "!str:~,1!"=="5" (
set/a n+=1
if !n! equ 1 set str=!str!%%j
if !n! equ 3 set str=!str!&goto :end
)
)
)
goto :eof
:end
mshta vbscript:createobject("wscript.shell").popup(" %ScdLine:~1,-1% !str! ")
@echo off
setlocal enabledelayedexpansion
for /f "tokens=*" %%a in ('dir /b /tc /o-d /a *.txt') do (
set NewFile=%%a
goto :next
)
:next
set str=
for /f "usebackq delims=" %%i in ("%NewFile%") do (
for %%j in (%%i) do (
set str=%%j
if "!str:~,1!"=="5" (
set/a n+=1
if !n! equ 1 set str1=%%j
if !n! equ 3 set str2=!str1!%%j&goto :end
)
)
)
goto :eof
:end
mshta vbscript:createobject("wscript.shell").popup(" !str2! !str2! ")