码迷,mamicode.com
首页 > 其他好文 > 详细

bat相关命令

时间:2018-10-04 11:32:38      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:find   err   命令   inf   文件   txt   form   object   info   

@echo on

@echo 正在清理垃圾文件,请稍候......
del *.psd/s

del  *.manifest *.exp *.ilk  *.pdb *.txt *json *.lib
del  TestHttpDll.exe
cd Bin/dll
del  *.exp *.ilk  *.pdb *.lib

@echo 清理完毕!!!
pause

  

这个方案暂时不行

@echo off

echo 获取Administrator权限
cacls.exe "%SystemDrive%\System Volume Information" >nul 2>nul
if %errorlevel%==0 goto Admin
if exist "%temp%\getadmin.vbs" del /f /q "%temp%\getadmin.vbs"
echo Set RequestUAC = CreateObject^("Shell.Application"^)>"%temp%\getadmin.vbs"
echo RequestUAC.ShellExecute "%~s0","","","runas",1 >>"%temp%\getadmin.vbs"
echo WScript.Quit >>"%temp%\getadmin.vbs"
"%temp%\getadmin.vbs" /f
if exist "%temp%\getadmin.vbs" del /f /q "%temp%\getadmin.vbs"
exit

:Admin
echo 成功取得Administrator权限


@echo 正在清理垃圾文件,请稍候......

for /r "." %%a in (*.bmp *.xui *.json) do (
find "" %%a
if "!errorlevel!"=="0" (
echo %%a
del %%a
)  
)

@echo 清理完毕!!!
pause

 

bat相关命令

标签:find   err   命令   inf   文件   txt   form   object   info   

原文地址:https://www.cnblogs.com/leochan007/p/9739873.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!