Skip to content

Instantly share code, notes, and snippets.

@madgrk
Last active June 15, 2021 13:00
Show Gist options
  • Save madgrk/b7c43a3b96f1232f5d255f22a4ac32a9 to your computer and use it in GitHub Desktop.
Save madgrk/b7c43a3b96f1232f5d255f22a4ac32a9 to your computer and use it in GitHub Desktop.
Maven delete corrupt dependencies
:: Usage
:: C:/M2> delete-corrupt-dependencies.bat > files.txt
@echo off
setlocal EnableDelayedExpansion
set last=?
for /f %%I in ('dir /s /b /o:n /a-d "*.lastUpdated"') do (
if !last! NEQ %%~dpI (
set last=%%~dpI
echo !last!
rd /s /q !last!
)
)
goto end
:end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment