Forum Discussion
irina_lukina
13 years agoSuper Contributor
Hi Rajesh,
1.
Is there is any general way to extract without using 3rd party software?
TestComplete doesn't provide such functionality. However, you can do this using the built-in objects and methods of VBScript:
Sub Test
'Specifies the location of the zip file.
ZipFile="D:\Test\Test.zip"
'Specifies the folder the contents should be extracted to.
ExtractTo="D:\Test\"
'If the extraction location does not exist, create it.
Set fso = CreateObject("Scripting.FileSystemObject")
If NOT fso.FolderExists(ExtractTo) Then
fso.CreateFolder(ExtractTo)
End If
'Extract the contents of the zip file.
set objShell = CreateObject("Shell.Application")
set FilesInZip=objShell.NameSpace(ZipFile).items
objShell.NameSpace(ExtractTo).CopyHere(FilesInZip)
Set fso = Nothing
Set objShell = Nothing
End Sub
2.
Is there any way where we can encrypt this in script?
Try using the script provided in the following How To entry:
Working with encrypted data storage
BTW, in the future, please create different forum threads for different questions. It will be easier for us to reply to them and for other users to search for the threads that may assist in solving their problems.
Thanks :)
Related Content
- 3 years ago
- 4 years ago
- 2 years ago
Recent Discussions
- 9 hours ago
- 10 hours ago
- 16 hours ago