Skip to content

Instantly share code, notes, and snippets.

@VintageAppMaker
Created November 10, 2023 02:11
Show Gist options
  • Save VintageAppMaker/0c304341d2c843b23bbd1a8f0d92438d to your computer and use it in GitHub Desktop.
Save VintageAppMaker/0c304341d2c843b23bbd1a8f0d92438d to your computer and use it in GitHub Desktop.
DOS 배치파일 - txt 파일에서 특정문자열이 있으면 지우기
@echo off
echo "월수익1000만"이 포함된 파일 삭제 시작
for %%i in (*.txt) do (
find /i "월수익1000만" "%%i" > nul
if %errorlevel% equ 0 (
echo "%%i" 파일에서 "월수익1000만"을 찾았습니다. 파일을 삭제합니다.
del "%%i"
)
)
echo "월수익1000만"이 포함된 파일 삭제 완료
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment