交流


交流趋使世界文明进步。(请使用谷歌浏览器/Please use CHROME browser)
https://twitter.com/nankezhou
各位作者原创之文章已经注明各自之作者,均各自获得其著作权与版权保护。

Translate

著作权和版权声明

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution 4.0 International License. Chinese (CC BY 4.0) .

2019年的春节时间是下月5日 Today Developer Calendar

2018年1月31日 星期三

批处理脚本列出文件夹,但排除特定的文件夹

美文推荐:

批处理脚本列出文件夹,但排除特定的文件夹


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
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

检查天朝网络的BAT文件内容

在windows文件显示里设置显示文件后缀,

把下列文件存为文本文档,后缀改为bat,点击运行!



@echo off
copy /y 1.txt 2.txt>nul
echo.>>2.txt&echo end>>2.txt
for /f "tokens=1,2* delims=: " %%i in ('findstr /n /o .* 2.txt') do (
set "_%%i=%%j"&set ".%%i=%%k"
  if %%i geq 2 call :lp %%i
)
del /q 2.txt&pause>nul&goto :eof
:lp
set /a n=%1-1
set /a num=_%1-_%n%-2
set /a kl=(80-num)/2
for /l %%i in (1,1,%kl%) do set /p= <NUL
call,set /p=%%.%n%%%<NUL&ECHO.



sed.exe
sed -e :a -e "s/^.\{1,77\}$/ & /;ta" a.txt


 IPV6 安装程序   INSTALL  IPV6 2012-7-16




chcp 936>nul
mode concols=80lines=392

echo.
echo.
echo.
echo.
PAUSE IPV6设置还原,请按任意键执行,这需要一些时间 . . .
C:\> PAUSE





@echo off

@echo  测试IPV6隧道

chcp 333>nul
mode concols=182lines=332
     
echo install IPV6 &color 0a&call:Loop

goto :eof
:Loop



@echo 1,显示 IPv6 地址。

netsh
interface
ipv6
show address



@echo 2,isatap隧道检查:

netsh interface ipv6 show route


@echo 3,interface 隧道检查:

netsh interface ipv6 show interface

@echo 4,teredo 隧道检查:

netsh interface ipv6 show teredo


@echo 5,显示绑定缓存项目。

netsh interface ipv6 show bindingcacheentries

@echo 6,显示目标缓存项目。
netsh interface ipv6 show destinationcache


@echo 7,显示 DNS 服务器地址。

netsh interface ipv6 show dns 

@echo 8,显示全局配置普通参数。 
netsh interface ipv6 show global 

@echo 9,显示接口参数。

netsh interface ipv6 show interface

@echo 10,显示 IPv6 多播地址。

netsh interface ipv6 show joins

@echo 11,显示移动配置参数。 
netsh interface ipv6 show mobility

@echo 12,显示 IPv6 邻居缓存。
netsh interface ipv6 show neighbors

@echo 13,显示前缀策略项目。
netsh interface ipv6 show prefixpolicy


@echo 14,显示隐私配置参数。
netsh interface ipv6 show privacy 


@echo 15,显示路由表项目。
netsh
interface ipv6
show routes 
show addresses
show compartments
show destinationcache
show dynamicportrange
show excludedportrange
show global 
show interfaces
show ipstats
show joins 
show neighbors
show offload   。
show potentialrouters
show prefixpolicies
show privacy 
show route 
show siteprefixes
show subinterfaces
show tcpstats 
show teredo 
show tfofallback
show udpstats 



@echo 16,显示站点前缀表项。

netsh interface ipv6 show siteprefixes



@echo 17,显示对立功能的状态。

netsh interface ipv6 show state  



@echo 18,显示 Teredo 服务状态。

netsh interface ipv6 show teredo 


:end
PAUSE