Created
June 19, 2022 17:34
-
-
Save Rademenes16/b4fb43f1a425b0a7ea0f7f6a3c32c21b to your computer and use it in GitHub Desktop.
Remove files with .exe extension in current directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 [92mFiles successfully deleted![0m | |
echo. | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment