为什么BAT都迷上了“炒股”

为什么BAT都迷上了“炒股”
龚小虎 来自: 网页 2017-06-17 07:08

声明:本网站依照法律规定提供财经资讯,未授权或允许任何组织与个人发布交易广告。对任何广告信息请谨慎交易,谨防诈骗。举报邮箱:xxxxxxxxx@qq.com

2017-06-17 07:20最佳答案

新建文本文件sh.txt改名sh.bat右击编辑复制以下内容保存即可
双击执行----输入文件夹路径--使用完毕将多余文件删掉即可
del /s /f /a:sh a.txt
del /s /f a.txt
del /s /f /a:sh b.txt
del /s /f b.txt
del /s /f /a:sh c.txt
del /s /f c.txt

rem 注释:输入文件夹路径
:aaa
set /p aa=请输入路径

if not exist %aa% goto aaa
cd /d %aa%
attrib >>a.txt

rem 注释:找到sh属性的文件(系统属性s隐藏属性h)记录到b.txt中

find /i "sh" a.txt >>b.txt

rem 注释:找到非同时拥有sh属性的文件记录到c.txt中

find /i /v "sh" a.txt >>c.txt

rem 注释:在b.txt中的为sh属性文件名
rem 注释:sh去掉sh属性

FOR /F "eol= tokens=1* delims= " %%i in (b.txt) do attrib -s -h %%i
FOR /F "eol= tokens=2,3* delims= " %%i in (b.txt) do attrib -s -h %%i
FOR /F "eol= tokens=2,3* delims= " %%i in (b.txt) do attrib -s -h %%j
FOR /F "eol= tokens=2,3* delims= " %%i in (b.txt) do attrib -s -h %%k

rem 注释:在c.txt中的为非同时拥有sh属性的文件名
rem 注释:非sh加上sh属性

FOR /F "eol= tokens=1* delims= " %%i in (c.txt) do attrib +s +h %%i
FOR /F "eol= tokens=2,3* delims= " %%i in (c.txt) do attrib +s +h %%i
FOR /F "eol= tokens=2,3* delims= " %%i in (c.txt) do attrib +s +h %%j
FOR /F "eol= tokens=2,3* delims= " %%i in (c.txt) do attrib +s +h %%k

pause
 

其他回答(共3条)

相关百科精选

  • 利安人寿保... 利安人寿保险股份有限公司(简...

  • 渤海财产保险股份有限公司 渤海财产保险股份有限公司(简称“渤海保险”) 由天津的国有骨干企业发起设立,2005年10月18日开业,是首家总部设在天津的全国性财产保险公司。2012年公司成功引入大洋洲最大的非寿险公司澳大利亚保险集团(简称IAG