windows:用bat脚本删除指定后缀的文件

@echo off
:start
@echo please pull in your python project root directory:
@set /p dir_path=
@if not exist "%dir_path%" echo.directory not exit!&goto :start
@echo please input delete suffix
@set /p del_ex=
@echo delete directory in %dir_path% with %del_ex% suffix
del %dir_path%\*.%del_ex% /f /s /q /a

@pause

你可能感兴趣的:(windows)