2013-04-24 2 views

답변

1

시도해보십시오.

@echo off 
for /f %%F in ('dir /b /a-d ^| findstr /vile ".c .cpp"') do del "%%F" 
1
@echo off 
setlocal EnableDelayedExpansion 
set preserve=.c.cpp. 
for %%a in (*.*) do (
    if "!preserve:%%~Xa=!" equ "%preserve%" (
     del "%%a" 
    ) 
) 

이 배치 파일은 파이프 나 외부 명령 (의 Find.exe 같은 또는 Findstr.exe를) 더 빨리 실행할 수 있도록를 사용하지 않습니다.

관련 문제