Wednesday 21 December 2011

Archive QTP results using XStandard.Zip


'Prerequisite

#Download the free zip component from - http://www.xstandard.com/en/documentation/xzip/
# Move the dll to a directory like: C:\Program Files\XStandard\Bin\
# Open a command prompt and cd to the directory where the dll is located
# Type regsvr32 XZip.dll
# Grant "Read & Execute" file permissions on this dll to Everyone

'------------------------------------------------------------------------------------------------------------

Function ArchiveResults(sFolderPath)

Dim strFolder, strZipFile
strZipFile = sFolderPath&"Results_"&MonthName(Datepart("M", Date))&"_"&Datepart("D", Date)&"_"&Minute(Now)&Second(Now)&".zip"
Set objZip = CreateObject("XStandard.Zip")
objZip.Pack strFolder, strZipFile
Set objZip = Nothing

End Function

'------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment