我陷入了这个陷阱困境的困境。所以除了这里之外别无他法。
@echo off
pushd "Program Files (x86)\Log Parser 2.2\"
for /f "tokens=1,2 delims=," %%A in (d:logs\serverdrives.txt) do @logparser -i:tsv file:D:\logs\disktrend.sql?sd=%%A -o:chart -charttype:line > D:\logs\%%B.gif
SELECT date,pfree using to_int(sub(to_real(100),to_real(replace_chr(free,'%','')))) as pfree,replace_chr(strcat(server,drive),':','') AS serverdrive from d:\logs\compiled\*.log where serverdrive =%sd%
'SERV06F',SERV06F
'SERV00F',SERV00F
Date Server Drive Free Free Space Total
20120914 SERV06 F: 79.55% 27619.02MB 34719.82MB
20120914 SERV00 F: 99.73% 34630.37MB 34723.81MB
当我运行批处理脚本时,我得到以下错误:
Invalid output filename ""
Invalid output filename ""
有谁知道如何解决这个问题?
答案 0 :(得分:1)
@echo off
pushd "Program Files (x86)\Log Parser 2.2\"
for /f "tokens=1,2 delims=," %%A in (d:logs\serverdrives.txt) do @logparser -i:tsv file:D:\logs\disktrend.sql?sd=%%A+filen=%%B -o:chart -charttype:smoothline -q:off -stats:off
SELECT to_string(date),pfree using to_int(sub(to_real(100),to_real(replace_chr(free,'%','')))) as pfree,replace_chr(strcat(server,drive),':','') AS serverdrive into d:\logs\%filen%.gif from d:\logs\compiled\*.log where serverdrive =%sd%