511182890 当前离线
二级士官
TOP
pcl_test 当前离线
荣誉版主
@echo off md "筛选结果\" 2>nul for /f "tokens=1-6* delims=-" %%a in ('dir /a-d /b /tc /o-d *.dxf') do ( if not exist "筛选结果\%%a-%%b-%%c-%%d-%%e-%%f*.dxf" ( copy "%%a-%%b-%%c-%%d-%%e-%%f-%%g" "筛选结果\" /y ) ) pause复制代码
回家路上 当前离线
少尉
@echo off & setlocal enabledelayedexpansion md "筛选结果\" 2>nul for /f "tokens=1-6* delims=-" %%a in ('dir /a-d /b /od *.dxf') do set "##%%a-%%b-%%c-%%d-%%e-%%f=%%a-%%b-%%c-%%d-%%e-%%f-%%g" for /f "tokens=2 delims==" %%a in ('set ##') do copy %%a "筛选结果\" /y pause & exit /b复制代码
慕夜蓝化 当前离线
四级士官
echo off setlocal enabledelayedexpansion for /f "delims=" %%i in ('dir /s/b/l/ad') do ( for /f "delims=" %%a in ('dir /b /l /aa /o-d "%%i\*.dxf"') do ( set/aa+=1 if !a! neq 1 del /f/q "%%i\%%a" ) set/aa=0 ) pause复制代码
C:\Documents and Settings\Administrator\桌面\新建文件夹 (2)>echo off 找不到文件 请按任意键继续. . .复制代码
xudaweb 当前离线
@echo off for /f "delims=" %%i in ('dir /b /a /od *.dxf') do ( set "the_latest=%%i" ) copy %the_latest% %the_latest%.BAK del *.dxf ren %the_latest%.BAK %the_latest% pause>nul复制代码