Author Topic: Download Regression Suite (zip file) - Also unzip in local file System  (Read 1985 times)

Offline joseph

  • Newbie
  • *
  • Posts: 42
  • QTP Professional
    • http://
My automation regression suite is in Quality Center in zip format. if anyone has vbscript/QTP code to download the zip file and again unzip in local file system.

It is a great help.

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3084
    • KnowledgeInbox
Break your problem into 2 parts. 1st is to download the file, so if you google or search on SQAforums you will get a lot of examples for the same

2nd one can be searched on google as well. "Unzip a file using VBscript"
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline sreekanth CR

  • Newbie
  • *
  • Posts: 19
  • Sreekanth Chilam,Senior Test Automation Specialist
Hi All,

Here iam provding a nice user defined function for unzipping a Zip file.

Check out the below function & implement as per ur requirements.

' Function Defination :

 Function Unzip(source_ZIPFile,ExtractToPath)
   'Variable Definition
    Dim sZIPFile
   Dim sExtractToPath
    Dim oShell
   Dim oZippedFiles
    'Variable Initialization
   Set oShell = CreateObject("Shell.Application")
   'Get the contents of the ZIP archive
   Set oZippedFiles=oShell.NameSpace(sZIPFile).items
   'Copy the contents into the destination folder
   'Free Objects
   Set oZippedFiles = Nothing
   Set oShell = Nothing
 End Function

' Function Declaration/Calling :

 Call Unzip("Source zip file path","path where to be extracted")

Have a nice day...... :D :)
Never limit your Challenges, Challenge your limits.