I have an issue with loading QVDs from a folder. I have script which loads all the exiting QVDs and concatenate them into one large main QVD. Now the script fails due to a missing field and now I want to know which QVD is correpted. So the question is where to put the traceing statement?
So is your objective to find which file is corrupted or to get the trace command? There is a difference between them. For the first you only need to check the last file loaded in the document logfile.
If it is the latter I would work with the FileList function and loop on the files in the catalogue you have your files in with a For each File in FileList... and then trace the file that way. You could also try catching ScriptError=11 which is Field is missing.