Skip to content

Instantly share code, notes, and snippets.

@Rademenes16
Created June 19, 2022 17:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rademenes16/b4fb43f1a425b0a7ea0f7f6a3c32c21b to your computer and use it in GitHub Desktop.
Save Rademenes16/b4fb43f1a425b0a7ea0f7f6a3c32c21b to your computer and use it in GitHub Desktop.
Remove files with .exe extension in current directory
@echo off
Title Delete .exe Files
echo Current Directory: %CD%
echo.
echo Do you want to delete files with .exe extension in current directory [Y/n]?
set /p CHO=
IF %CHO% == y (
del /s /q /f %CD%\*.exe
) ELSE (
IF %CHO% == Y (
del /s /q /f %CD%\*.exe
) ELSE (
exit
)
)
echo Files successfully deleted!
echo.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment