Code is as follows –
strFilePathToSave = “C:\Library\function.vbs”
strFilePathToSave = “C:\Library\function.vbs”
Set QCConnection = QCUtil.QCConnection
Set treeManager = QCConnection.TreeManager
Set treeManager = QCConnection.TreeManager
‘ Specify the local path to the file.
LocalFilePath = strFilePathToSave
‘ Specify the Quality Center path to the desired folder
QC_Path =”Subject\BW Automation\Library”
Set node = treeManager.nodebypath(QC_Path)
set att = node.attachments
Set atta = att.AddItem(Null)
atta.FileName = LocalFilePath
atta.Type = 1
atta.Post()
Note – This code uploads only one file, run this code in loop & assign file names to variable strFilePathToSave, will upload all files from local folder.
No comments:
Post a Comment