联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off&setlocal enabledelayedexpansion for /f %%i in ('dir /b') do ( set /a a+=1 set b=%%~ni set c=!b:~0,6! for /f %%z in ('dir /b') do ( set /e e+=1 set d=%%~nz set f=!d:~0,6! if !a!==!e! ( echo 同文件 ) else ( if !c!==!f! copy %%~nxi %%z ) ) ) pause
@echo off type nul>200611.txt for /f "delims=" %%i in ('dir /b /a-d 200*.txt') do (copy 200611.txt+%%i 200611.txt) pause
Originally posted by kissbill at 2008-12-13 16:41: 那你 以前就没说清楚 哎。。
@echo off setlocal EnableDelayedExpansion for /f "delims=" %%i in ('dir /a-d /b *.txt') do (set e=%%i set e=!e:~0,6! type nul>!e!.txt) for /f "delims=" %%i in ('dir /b /a-d 200*p*.txt') do (set a=%%i set b=!a:~0,6! copy !b!.txt+%%i !b!.txt >nul 2>nul ) pause
Originally posted by HAT at 2008-12-13 23:01: 本版搜索“文件日期” 本版搜索“type nul” 本版搜索“>nul 2>nul”