我在 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"