批处理操作递归目录下的文件

来自http://tunps.com/batch-scripting-recursion-dir

情况: 某php cms系统使用zend guard加密,解密程序是cli模式下面运行,并且每次只能解密单个文件,所以需要使用批处理来解密所有目录下面的php文件。 代码:
for /f "delims=" %%a in ('dir d:\xxcms\*.php /s /b') do decode.exe  %%a
update(2011.3.30)有时候不能用两个百分号,否则提示:此时不应有 %%a。 改为一个百分号就可以了
for /f "delims=" %a in ('dir d:\xxcms\*.php /s /b') do decode.exe  %a

About tunpishuang

just 4 fun·····
This entry was posted in 未分类 and tagged . Bookmark the permalink.

One Response to 批处理操作递归目录下的文件

  1. Pingback: TechGuru » Blog Archive » zend guard解密

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>