Board logo

标题: [文本处理] [已解决]怎样把BAT批处理代码改成把结果导出到a.txt? [打印本页]

作者: 001011    时间: 2013-12-28 21:43     标题: [已解决]怎样把BAT批处理代码改成把结果导出到a.txt?

这个是foxJL版主帮我写的
但是在cmd窗口看结果比较费劲,能否设置成把结果导出到a.txt
非常感谢
  1. @echo off & setlocal enabledelayedexpansion
  2. for /f  "delims=" %%i in ('dir /a-d /b /s c:\123\in\*.jpg,c:\123\in\*.tif 2^>nul') do (
  3.   set fn=%%~dpni& set fn=!fn:c:\123\in\=c:\123\out\!
  4.   if not exist "!fn!.pdf" echo,%%i 未转换
  5. )
  6. pause
复制代码

作者: lifei259    时间: 2013-12-28 21:51

  1. @echo off & setlocal enabledelayedexpansion
  2. for /f  "delims=" %%i in ('dir /a-d /b /s c:\123\in\*.jpg,c:\123\in\*.tif 2^>nul') do (
  3.   set fn=%%~dpni& set fn=!fn:c:\123\in\=c:\123\out\!
  4.   if not exist "!fn!.pdf" echo,%%i 未转换>>a.txt
  5. )
  6. pause
复制代码

作者: 001011    时间: 2013-12-28 22:05

我这样加了的  怎么不行呢
可能当时我的代码有问题吧
非常感谢




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2