0
for /f %%f in ('dir /b C\logs\*.log') do (
for /f "tokens=2,3,4 " %%i in (\\***%%f) do (
if %%i==START echo %%k
)
)
这个脚本西港岛线brouwse所有* .log文件搜索开始为第二个字的连接,然后西港岛线呼应我的第四个单词(时间标记),但我想在那个变种时间戳像这样,但我没有工作批读取目录和文件的问题
for /f %%f in ('dir /b C\logs\*.log') do (
for /f "tokens=2,3,4 " %%i in (\\***\%%f) do (
if %%i==START set timestamp=%%k
)
echo %timestamp%
)
%timestamp%var是空的,当我回声吗?有人能帮助我吗?
关于马可
安装cygwin ,然后运行一个bash脚本。 – LatinSuD 2010-09-23 11:13:25
@LatinSuD它是一个.bat批处理脚本witch是Windows XP本地命令行工具,为什么我应该使用cygwin来“模拟”linux api的? – Proxx 2010-09-23 11:16:29