我一直在研究一个批处理脚本,它检查文件的大小并在大小大于 0 字节的情况下发送电子邮件:
set V_TMP_FILE="D:\pmserver\Tgtfiles\XLI_stage\f_cdc_flag1.out"
set minbytesize=0
if exist %V_TMP_FILE% (
FOR %%A IN ('%V_TMP_FILE%') DO set size=%%~zA
if %size% GTR %minbytesize% (
%V_EMAIL_PATH%\postie -host:internalmail.usa.xl -to:"%V_TO_EMAIL_ID%" -from:%COMPUTERNAME%@xlgroup.com -s:"%V_SRC_TABLE_NM% %V_SUBJ%" -msg:"%V_MSG%"
) else (
echo %V_TMP_FILE% is EMPTY
)
我收到以下错误 -
标准输出和错误:
h file. 0 was unexpected at this time.
D:\Informatica91\server\bin>if GTR 0 (
请帮我解决这个问题,这真的需要我花时间去挖掘这个问题。