美文推荐:
for /r E:\apks\apktool\ %%i in (AndroidManifest.xml;
"dir /s /a-d "E:\apks\apktool\" |findstr "\.\"|findstr /i /e /v "\assets\"|findstr /i /e /v "\lib\"|findstr /i /e /v "\original\"|findstr /i /e /v "\res\"|findstr /i /e /v "\smali\"|findstr /i /e /v "\smali_classes2\"|findstr /i /e /v "\unknown\"") do (start D:"\program files\EditPlus\editplus.exe" E:\apks\apktool\2*\AndroidManifest.xml,--type .xml --file "AndroidManifest.xml" "%%~i" )
)
echo.
pause
批处理脚本列出文件夹,但排除特定的文件夹
https://stackoverflow.com/questions/15568541/batch-script-to-list-folders-but-exclude-specific-folders
dir /b /s /aa <path>
/b for less verbose output,
/s for recursive (sub directories)
/aa for only files ready to be archived.
/a-d for only files name
/a-d for only files name
Will do the trick. This is usually the case for normal created files - it defaults to on!
The /ad eliminates filenames -
Nevertheless, without a ` after \done`
must add
|findstr /i /e /v
to exclude foldernames (use only filenames) dir /a-d
一段遍历递归控制代码(还不成熟的代码,主要在于可以遍历,可以读出,还无法控制读取权限):
一段遍历递归控制代码(还不成熟的代码,主要在于可以遍历,可以读出,还无法控制读取权限):
for /r E:\apks\apktool\ %%i in (AndroidManifest.xml;
"dir /s /a-d "E:\apks\apktool\" |findstr "\.\"|findstr /i /e /v "\assets\"|findstr /i /e /v "\lib\"|findstr /i /e /v "\original\"|findstr /i /e /v "\res\"|findstr /i /e /v "\smali\"|findstr /i /e /v "\smali_classes2\"|findstr /i /e /v "\unknown\"") do (start D:"\program files\EditPlus\editplus.exe" E:\apks\apktool\2*\AndroidManifest.xml,--type .xml --file "AndroidManifest.xml" "%%~i" )
)
echo.
pause