Re: Getting the list of files in QC attachment folder
1- Why are you trying to read the file the hard way, if you are using QTP then connect to the QC project for the vbs, just add the vbs to the QTP resources and you can read it.
2- if you are trying to interact with QC through the API , then you have to post you question under the QC forum and you can have a look at the QC workflow
you can download the vbs file to temporary folder and then use QTP to read it. I did something similar for the Bug attachments when I integrated QC and Changepoint , I used to download the bug attachment to the C drive then upload the attachment to changepoint, the below code may help:
<font class="small">Code:</font><hr /><pre>
set filesys = CreateObject("Scripting.FileSystemObject")
set bf1 = TDConnection.BugFactory
set bg1 = bf1.Item(Bug_Fields("BG_BUG_ID").Value)
set af1 = bg1.Attachments
set al1 = af1.NewList("")
If al1.Count <> 0 Then
For i=1 to al1.Count
' Start Loading attachments from QC
set at1 = al1.Item(i)
set atStorage = at1.AttachmentStorage
atStorage.ClientPath = "C:\TEMP\"
call atStorage.Load(at1.Name, true)
' you can pass the below to a function in QTP to deal with the file you just downloaded from QC
fileName = at1.Name
fileNameAndPath = "C:\TEMP\" & at1.Name
"I realize it's an error, but no one is going to try to do that!"
From "Top 10 Stupid Comments from Developers".