Hi everybody,
I've used the "search" function but could not find anything similar to my issue [img]/images/graemlins/frown.gif[/img]

I'm trying to do the following from a QTP script:
1) get all the runs of instance 1 from a given test set
2) for each run, download the results.xml and default.xls files in a specific directory on the pc which executes the script.

The 1) part runs ok, but I've got issues with 2): my script only downloads the files related to all the runs of the last test in my execution flow.

I always execute all the tests of the same instance in sequence and on the same pc. Therefore, when i click "run test set", all instance 1 tests go on pc1, and all instance 2 tests go to pc2. The attached image (testsetWF) helps to understand my execution flow.
I want to run my script from another pc, say pc3.

The result is that the script correctly identifies all the Runs in the test set but then only downloads files for the "Emissione Proposta" test, which is the last one of the ex.flow.

I tried with both the TestFactory.RepositoryStorage and Run.ExtendedStorage objects but the issue was always the same.
Here is my script:
<font class="small">Code:</font><hr /><pre>
testSetName = "'UPD20080801E - colldir - batteria'"
destBasePath = "C:\Documents and Settings\" &amp; Environment("UserName") &amp; "\Desktop\downloads"

'search the testSet by name
tsId = getTestSetId(testSetName)

'get all runs in the testSet that have an instance code = 1 and order them by exec date desc.
Set runList = getFlowRuns(tsId, 1)
print "I found " &amp; runList.count &amp; " runs."

Set fso = CreateObject("Scripting.FileSystemObject")

For each theRun in runList
Set repSt = QCUtil.QCConnection.TestFactory.RepositoryStorage
'ref to the test linked to this run
Set theTest = QCUtil.QCConnection.TestFactory.Item(theRun.TestId )
'download directory depends on the test set, run name and test name and instance

destPath = destBasePath &amp; _
"\" &amp; testSetName &amp; _
"\" &amp; theRun.Name &amp; _
"\[" &amp; theRun.TestInstance &amp; "] " &amp; theTest.Name &amp; "\"

repSt.ClientPath = destPath
repSt.ServerPath = theRun.ResultLocation

print theRun.Name &amp; " - [" &amp; theRun.TestInstance &amp; "] " &amp; theTest.Name
print vbTab &amp; "Res. location: " &amp; theRun.ResultLocation

d = repSt.load("-r Default.xls, -r Results.xml", true)

If fso.folderexists(d) Then
print vbTab &amp; "Files downloaded into: " &amp; vbNewLine &amp; vbTab &amp; d
End If

Set repSt = nothing
Set theTest = nothing
Set theRun = nothing

Set fso = nothing
</pre><hr />

Has anybody ever had similar problems?
Any help would be much appreciated!

Thanks, Stige

P.s. I use QTP 9.2 and Quality Center 9.2 (no patch)