文件中被注释的代码一个是 获取md5,另一个是过滤出包名 批量删除应用
test.groovy
class test { public static void main(String[] args) { def file = new File("C://Users//Administrator//Desktop//screen//test") file.listFiles().each{ subFile ->// PRintln "certutil -hashfile ${subFile.name} MD5".execute().text if (subFile.name.endsWith("apk")) { println "adb install ${subFile.name}".execute().text// def segment = subFile.name.split("-")// def packageName = segment[segment.length-2]// "adb uninstall ${packageName} ".execute() } } }}运行命令:groovy test.groovy
C:/Users/Administrator/Desktop/screen/test下文件:
3D-Tech-locker.theme.l400000057-release.apkBear-locker.theme.l400000056-release.apkCity-Neon-locker.theme.l400000052-release.apkCrocodile-locker.theme.l400000044-release.apkDusk-locker.theme.l400000045-release.apkFalling-Flower-locker.theme.l400000051-release.apkFresh-Fruit-locker.theme.l400000050-release.apk'Living Hummingbird-locker.theme.l400000055-release.apk'Moto-Surfing-locker.theme.l400000046-release.apkParrots-locker.theme.l400000039-release.apkPink-Valentine-locker.theme.l400000058-release.apkRose-Valentine-locker.theme.l400000059-release.apkShore-locker.theme.l400000047-release.apktest.groovyValentine-Rose-locker.theme.l400000060-release.apkWinter-Glacier-locker.theme.l400000053-release.apk
新闻热点
疑难解答