
【已解決】求助查找批處理刪除同名圖片提示“找不到指定路徑”的原因我這里有一個用apktool反編譯出來的圖片資源,分別是drawable-hdpi-v4,drawable-xhdpi-v4,drawable-xxhdpi-v4這三種分辨率的圖片資源。我用比較軟件對它們進行了比較發現在這兩種分辨率之中有很多同名圖片 ,我是想把drawable-hdpi-v4里的同名圖片刪除掉,保留drawable-xhdpi-v4里的圖片,然后再刪除drawable-xhdpi-v4里的同名圖片,保留drawable-xxhdpi-v4里的圖片,就是說以drawable-xxhdpi-v4為準刪除低分辨率的同名圖片。最終保留drawable-xxhdpi-v4的圖片。之前超級版主foxJL給力代碼測試成功了的,但是最近幾天我拿來用就沒有成功過。不知道為啥!看吧提示找不到路徑。真是霉傷心了。 附上代碼:
由于圖片文件比較大我上傳到網盤:[url=http://pan.baidu.com/s/1i5q99ZJ][/url]麻煩大大們下載測試一下。nclick="copycode($('code0'));">復制代碼
- @echo off
- for /f delims= %%i in ('dir /b .drawable-xhdpi-v4*.png') do (
- if exist .drawable-xxhdpi-v4%%i del,%%~dpidrawable-xhdpi-v4%%i
- )
- for /f delims= %%i in ('dir /b .drawable-hdpi-v4*.png') do (
- if exist .drawable-xxhdpi-v4%%i del,%%~dpidrawable-hdpi-v4%%i
- )
- for /f delims= %%i in ('dir /b .drawable-hdpi-v4*.png') do (
- if exist .drawable-xhdpi-v4%%i del,%%~dpidrawable-hdpi-v4%%i
- )
- pause

