Maven无效文件、文件夹清理

@echo off
echo @describe Find out all lastUpdated, and delete its.
echo @author arkhome.com.cn
:again
set /p REPOSITORY_PATH=Please enter the local Maven warehouse Path:
:: Remove all double quotes
set REPOSITORY_PATH=%REPOSITORY_PATH:"=%
if not exist "%REPOSITORY_PATH%" (
echo Maven warehouse address not found, please try again.
goto again
)
for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%*lastUpdated*"') do (
del /s /q "%%i"
)
echo Expired files deleted successfully.
pause;

评论