将以下代码格式根据自己的目录修改后copy到一个文本文件中,修改后缀名为.bat,注意bin调用时的目录,不同版本的cognos 安装目录的名字不通过,可能为IBMcognos8
/*code begin*/
date /t
time /t
rem First Step:Call Transformer TO Update Cube
rem Start Cube Update
D:
cd D:\\Program Files (x86)\cognos\c8\bin
cogtr.exe -n1 -s -k1=2/3 D:\BIProject\models\4.pyj
cogtr.exe -n1 -s -k1=2/3 D:\BIProject\models\5.pyj
rem End update Cube
rem Second Step:Call Copy Cube
NET STOP "Cognos 8"
ping -n 200 -w 200 0.0.0.1
rem copy cube
D:
cd D:\BIProject\cubes
xcopy D:\BIProject\cubes\4.mdc D:\BIProject\publishcube /e /y
xcopy D:\BIProject\cubes\5.mdc D:\BIProject\publishcube /e /y
NET START "Cognos 8"
rem End File Copy
/*code end*/