我在Windows 7 64位上安装了IBM DOORS。当我运行DOORS DXL函数tempFileName()时,我得到\而不是像C:\ Users \\ AppData \ Local \ Temp这样的东西。我已经搜索了这个问题,但没有看到任何关于这个问题。有人有想法吗?
展示问题的一些示例代码是......
string productDetailsFile = tempFileName()
print "productDetailsFile = " productDetailsFile "\n"
if(canOpenFile(productDetailsFile, true))
print "Can write to file\n"
Stream out = write productDetailsFile
out << "Created by " doorsname " at " dateAndTime today ""
if (null out)
{
print "Could not create file " productDetailsFile ""
halt
}
flush out
close out
string directory = getDirOf (productDetailsFile)
print "directory = " directory "\n"
string newFileName = directory NLS_("\\") NLS_("DOORS_") doorsInfo(infoVersion) (NLS_(".xml_new"))
print "newFileName = " newFileName "\nAttempting to rename now\n"
string errorMsg = renameFile(productDetailsFile, newFileName)
if (!null errorMsg)
{
print "Rename failed with error - " errorMsg "\nTrying with modified file name now\n"
newFileName = directory NLS_("DOORS_") doorsInfo(infoVersion) (NLS_(".xml_new"))
print "newFileName = " newFileName "\nAttempting to rename now\n"
errorMsg = renameFile(productDetailsFile, newFileName)
if(!null errorMsg)
print "Still fails. Stopping script now, please send the DXL Output to Support"
}
else
print "Rename successful"
答案 0 :(得分:1)
根本原因是运行DOOR的计算机的TEMP设置为“系统变量” C:\ Users \ user-name \ AppData \ Local \ Temp并且没有设置“用户变量” 对于TEMP。
使功能正常工作: