Results 1 to 7 of 7
  1. #1

    Permission denied on copy results

    I was trying to copy results from Report folder to specified location in local drive, but getting the error "Permission Denied"

    code below:

    Reporter.ReportEvent micPass, “Testing Report”, “Testing Exporting of Report”
    ‘Get the result directory
    sResultDir = Environment(“ResultDir”)
    ‘Copy the file to destination
    Set fso = CreateObject(“Scripting.FileSystemObject”)
    fso.CopyFile sResultDir & “\Report\Results.xml”, “C:\Copy_Members.xml, True
    Set fso = Nothing

  2. #2

    Re: Permission denied on copy results

    You can't execute the script in QTP and copy the result when the script is running. Result are only available when the script ends

  3. #3

    Re: Permission denied on copy results


    You have to pass the result file as a reference into your current function , creating another object to access already opened file should give an error (at least windows is working great on this part [img]/images/graemlins/wink.gif[/img] )
    To err is to CODERS , to TEST is divine


  4. #4

    Re: Permission denied on copy results

    So we cant use this code in the script, becuase results can't be generated until this code pass..

    but what' the other way to make it work?

  5. #5

    Re: Permission denied on copy results

    You need to launch a external script asynchronously. Read my replies on below thread.


  6. #6

    Re: Permission denied on copy results

    Tupelo -

    I was stuck on this problem for awhile. What made mine work was, i put a "\" at the end of my directory.

    so if this is your directory: "C:\Folder\subfolder"
    add a "\" to subfolder and it should work.


    you may want to check if you have admin rights to write to a file. or even try writing to the root folder.

    I've troubleshooted this area for two days and have worked around it to get mine to work.

  7. #7

    Re: Permission denied on copy results

    wonderful... it worked really well... thanks alot



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:33 PM.

Copyright BetaSoft Inc.