{"id":111,"date":"2009-08-24T03:12:41","date_gmt":"2009-08-24T03:12:41","guid":{"rendered":"http:\/\/www.houquner.com\/?p=402"},"modified":"2009-08-24T03:12:41","modified_gmt":"2009-08-24T03:12:41","slug":"dos%e5%be%88%e5%bc%ba%e5%a4%a7zz","status":"publish","type":"post","link":"https:\/\/www.houquner.com\/index.php\/archives\/111","title":{"rendered":"dos\u5f88\u5f3a\u5927(zz)"},"content":{"rendered":"<p>\u6700\u8fd1\u6709\u4e00\u4e2a\u5c0f\u9879\u76ee\u9700\u8981\u505a\u4e00\u4e9b\u5728windows\u670d\u52a1\u5668\u4e0a\u7684\u8c03\u5ea6\u5de5\u4f5c\uff0c\u4e4b\u524d\u4e5f\u4e00\u76f4\u56f0\u6270\u5728\u8fd9\u91cc\uff0c\u7528php\u6216\u8005python\u4e5f\u53ef\u4ee5\u89e3\u51b3\u95ee\u9898\uff0c\u4f46\u662f\u9700\u8981\u5728windows\u670d\u52a1\u5668\u518d\u5b89\u88c5\u73af\u5883\uff0c\u60f3\u4e86\u60f3\uff0c\u8fd8\u662f\u5e0c\u671b\u7528\u6700\u7b80\u5355\u7684dos\u811a\u672c\u6765\u5b8c\u6210\u5de5\u4f5c\u3002<\/p>\n<pre><code>dos\u811a\u672c\uff0c\u5176\u5b9e\u5728windows2003\u4e2d\u5df2\u7ecf\u6709\u4e86\u5f88\u591a\u589e\u5f3a\uff0c\u9664\u4e86\u539f\u6709\u4e60\u60ef\u4f7f\u7528\u7684dos\u547d\u4ee4\u4e4b\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 wsh(Windows Scripting Host)\u811a\u672c\u6df7\u5408\u4f7f\u7528\u3002\u5bf9\u4e00\u4e9b\u7b80\u5355\u7684\u5de5\u4f5c\u6709\u5f88\u597d\u7684\u5e2e\u52a9\u3002\n<\/code><\/pre>\n<p>\u4e0b\u9762\u628a\u8fd9\u4e2a\u5c0f\u9879\u76ee\u7528\u7684\u51e0\u4e2a\u597d\u73a9\u7684\u547d\u4ee4\u7ed9show\u4e00\u4e0b\u3002<\/p>\n<p>1\uff09forfiles     forfiles\u4ee5\u524d\u6ca1\u6709\u7528\u8fc7\uff0c\u662f\u53ef\u4ee5\u904d\u5386\u4f60\u6307\u5b9a\u7684\u76ee\u5f55\uff0c\u6309\u7167\u4f60\u7684\u8981\u6c42\uff0c\u904d\u5386\u6307\u5b9a\u7684\u65e5\u671f\u3001\u6587\u4ef6\u5927\u5c0f\u7b49\u7684\u6761\u4ef6\uff0c\u7136\u540e\u8fdb\u884c\u64cd\u4f5c  \u76f8\u5f53\u4e0e\u5bf9files\u7684for\u547d\u4ee4\u3002\u5230\u5fae\u8f6f\u4e0a\u770b\u5e2e\u52a9\u3002\u6211\u7528\u7684\u662f\u65f6\u95f4\u53c2\u6570\uff0c\u5220\u9664\u638930\u5929\u4e4b\u524d\u7684\u6587\u4ef6\u3002FORFILES \/D -30 \/P d:datafile \/M <em>.<\/em> \/s \/C \u201ccmd \/c del @path\u201d   d:datafile\u662f\u6211\u7684\u5de5\u4f5c\u76ee\u5f55\uff0c\u8fd9\u4e2a\u547d\u4ee4\u53ef\u4ee5\u5220\u9664\u638930\u5929\u4ee5\u524d\u521b\u5efa\u7684\u6587\u4ef6\uff0c\u53ef\u60dc\u6709\u4e00\u4e2a\u7f8e\u4e2d\u4e0d\u8db3\uff0c\u5c31\u662f\u4e0d\u80fd\u5220\u9664\u76ee\u5f55\uff0c\u7528forfiles\u5982\u679c\u4e0d\u52a0\u53c2\u6570\u662f\u53ef\u4ee5\u904d\u5386\u51fa\u76ee\u5f55\u6765\u7684\uff0c\u4f46\u662f\u52a0\u4e86\u53c2\u6570\uff0c\u5c31\u65e0\u6cd5\u904d\u5386\u6216\u8005\u5f88\u9ebb\u70e6\u4e86\u3002\u7136\u540eforfiles\u4e4b\u540e\u3002\u589e\u52a0\u4e86\u4e00\u4e2a\u904d\u5386\u5220\u9664\u7a7a\u76ee\u5f55\u7684\u547d\u4ee4<\/p>\n<p>FORFILES \/D -30 \/P d:datafile \/M <em>.<\/em> \/s \/C \u201ccmd \/c del @path\u201d<\/p>\n<p>d:<br \/>\ncd<br \/>\ncd datafile<\/p>\n<p>rem =====<br \/>\nfor \/f \u201cdelims=\u201d %%i in (\u2019dir \/ad \/b \/s\u2019) do call :rd_dir_empty \u201c%%i\u201d<br \/>\ngoto :eof<\/p>\n<p>rem ======= \u5220\u9664\u7a7a\u76ee\u5f55 =========<br \/>\n:rd_dir_empty<br \/>\nrd %1 2&gt;nul||goto :eof<br \/>\nset dir_route=%1<br \/>\nfor \/f \u201cdelims=\u201d %%i in (%dir_route%) do (<br \/>\n    set dir_route=\u201d%%~dpi\u201d<br \/>\n    for \/f \u201cdelims=\u201d %%j in (\u2019dir \/ad \/b \u201c%%~dpi\u201d\u2018)do rd \u201c%%~dpi%%j\u201d 2&gt;nul||goto :eof<br \/>\n)<br \/>\n:: \u628a\u8def\u5f84\u6700\u540e\u7684\u53bb\u6389\uff0c\u4ee5\u4fbfset route_deepest=\u201d%%~dpi\u201d\u80fd\u53d6\u5230\u4e0a\u4e00\u5c42\u8def\u5f84<br \/>\nif \u201c%dir_route:~-2,1%\u201d==\u201d\u201d set dir_route=\u201d%dir_route:~1,-2%\u201d<br \/>\nif \/i not \u201c%cd%\u201d==%dir_route% call :rd_dir_empty %dir_route%<br \/>\ngoto :eof<\/p>\n<p>\u5c06\u4e0a\u8ff0\u7f16\u5199\u6210\u4e00\u4e2a\u6279\u5904\u7406 del30.bat<\/p>\n<p>\u56e0\u4e3adatafile\u76ee\u5f55\u672c\u8eab\u662f\u63d0\u4f9biis\u670d\u52a1\u7684\u3002\u8fd9\u6837\u5220\u9664\u53ef\u80fd\u5220\u9664\u4e0d\u6389\u3002\u5c31\u518d\u7f16\u5199\u4e00\u4e2a\u6279\u5904\u7406<\/p>\n<p>rundel.bat<\/p>\n<p>rem ==\u505c\u6b62iis\u670d\u52a1<\/p>\n<p>net stop w3svc<\/p>\n<p>rem ==\u8c03\u7528del30.bat \u7136\u540e\u8fd4\u56de\u5230\u6b64\u5904<\/p>\n<p>call del30.bat<\/p>\n<p>rem==\u542f\u52a8iis<\/p>\n<p>net start w3svc<\/p>\n<p>\u7136\u540e\u518d\u7f16\u5199\u4efb\u52a1\u8ba1\u5212\uff0c\u8fd9\u4e2a\u6ca1\u4ec0\u4e48\u597d\u8bf4\u7684\u4e86\u3002\u6bcf\u5929\u5728\u51cc\u66683\u70b9\u6267\u884c\u3002<\/p>\n<p>2\uff09\u5220\u9664\u76ee\u5f55\u7684\u547d\u4ee4rmdir\uff0c \u5728windows2003\u4e2d\u53d6\u6d88\u4e86delete\u7684\u5220\u9664\u76ee\u5f55\u529f\u80fd\uff0c\u53d6\u4ee3\u7684\u662frmdir<\/p>\n<p>rmdir \u4e24\u4e2a\u53c2\u6570  \/s  \u5220\u9664\u6307\u5b9a\u76ee\u5f55\u4e0b\u6240\u6709\u7684\u76ee\u5f55\u548c\u6587\u4ef6<\/p>\n<p>\/q  \u9759\u9ed8\u6a21\u5f0f\u3002<\/p>\n<p>3\uff09\u7ba1\u9053\u7b26\u53f7\u6572\u56de\u8f66\uff0c\u5728\u547d\u4ee4\u4e2d\u95f4\uff0c\u6709\u4e00\u4e2a\u7b2c3\u65b9\u5de5\u5177\uff0c\u8fd9\u4e2a\u5de5\u5177\uff0c\u5728\u8fd0\u884c\u7ed3\u675f\u4e4b\u540e\uff0c\u63d0\u793a\uff0c\u6309\u56de\u8f66\u7ed3\u675f\u3002\u5982\u679c\u4e0d\u5904\u7406\u4ed6\uff0c\u5c31\u4f1a\u5728\u6279\u5904\u7406\u8fc7\u7a0b\u4e2d\u5361\u4f4f\u3002-_-#  \u5b9e\u9a8c\u4e86\u4e00\u4e0b\uff0c\u624d\u53d1\u73b0\u539f\u6765\u5728windows\u4e0b\uff0c\u56de\u8f66\u662fCR \u3002\u3002\u8fd9\u4e2a\u662f\u5728\u6211\u6700\u5f00\u59cb\u63a5\u89e6\u8ba1\u7b97\u673a\u7684\u65f6\u5019\uff0c\u6559\u6750\u4e0a\u662f\u8fd9\u6837\u5199\u7684\u3002\u6ca1\u6709\u60f3\u5230\u8fc7\u4e86\u82e5\u5e72\u5e74\u540e\uff0c\u624d\u5728\u5b9e\u9645\u7684\u5de5\u4f5c\u4e2d\u5e94\u7528\u5230\u3002\u771f\u662f\u3002\u3002\u3002\u65e0\u8bed\u554a\u3002<\/p>\n<p>type CR|\u7b2c3\u65b9\u5de5\u5177.exe  \u53c2\u6570[1] \u53c2\u6570[2]<\/p>\n<p>type CR\u7136\u540e\u8ddf\u4e00\u4e2a\u7ba1\u9053\u7b26\uff0c\u662f\u8868\u793a\u5c06\u4e00\u4e2a\u56de\u8f66\u4f20\u9012\u5230\u7b2c3\u65b9\u7a0b\u5e8f\u4e2d\u53bb\u3002\u8fd9\u6837\u5728\u7a0b\u5e8f\u7ed3\u675f\u7684\u65f6\u5019\uff0c\u5c31\u4f1a\u81ea\u52a8\u6572\u4e00\u4e2a\u56de\u8f66\uff0c\u6765\u7ed3\u675f\u8fd9\u4e2a\u7b2c3\u65b9\u5de5\u5177\u3002<\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.houquner.com\">Kermit\u7684\u7f51\u7ad9<\/a> &raquo; <a href=\"https:\/\/www.houquner.com\/index.php\/archives\/111\">dos\u5f88\u5f3a\u5927(zz)<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u6709\u4e00\u4e2a\u5c0f\u9879\u76ee\u9700\u8981\u505a\u4e00\u4e9b\u5728windows\u670d\u52a1\u5668\u4e0a\u7684\u8c03\u5ea6\u5de5\u4f5c\uff0c\u4e4b\u524d\u4e5f\u4e00\u76f4\u56f0\u6270\u5728\u8fd9\u91cc\uff0c\u7528php\u6216\u8005python\u4e5f\u53ef\u4ee5\u89e3\u51b3\u95ee\u9898\uff0c\u4f46\u662f\u9700\u8981\u5728windows\u670d\u52a1\u5668\u518d\u5b89\u88c5\u73af\u5883\uff0c\u60f3\u4e86\u60f3\uff0c\u8fd8\u662f\u5e0c\u671b\u7528\u6700\u7b80\u5355\u7684dos\u811a\u672c\u6765\u5b8c\u6210\u5de5\u4f5c\u3002 dos\u811a\u672c\uff0c\u5176\u5b9e\u5728windows2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/posts\/111"}],"collection":[{"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":0,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}