How to unzip the file using QTP/UFT

There are instances where we download the zip files in the automation scripts and the documents in this zip file needs to be verified. So need to unzip the file through QTP/UFT so that without any manual intervention your automation script can complete the test case execution.

Set ObjShell = CreateObject("Shell.Application")
'Get the contents of the ZIP archive
Set ObjZippedFiles=ObjShell.NameSpace(<path of the zipped file with file name>).items
'Copy the contents into the destination folder
ObjShell.NameSpace(<Path to extract the File>).CopyHere(ObjZippedFiles)
Set ObjZippedFiles = Nothing
Set ObjShell = Nothing

Comments

Popular posts from this blog

UFT - Resolving scrolling issue if object is not visible

How to create a zip folder using VBScript

how to access the excel file as database in UFT?