rajeshthomas
14 years agoContributor
How to extract a zip file and Can we hide the password that we enter in script ?
Hi
Question 1: I have a Zip file with name 1.zip , placed in "D:\Test". Can anyone help me in VB scripting to extract(unzip) this file in the same location. Although i have Winzip in my system, i am unsure that will it be available in the system we going to use this. Is there is any general way to extract without using 3rd party software.
Question 2: I have script to open a folder which has password. But the Test complete script records the password characters.... But i dont want the script to show the password character, Is there any way where we can encrypt this in script.
Original is "Call dlgnewfolder.Edit.SetText("cocunuttree")"
I need something like "Call dlgnewfolder.Edit.SetText("********")"
Thanks in Advance
Question 1: I have a Zip file with name 1.zip , placed in "D:\Test". Can anyone help me in VB scripting to extract(unzip) this file in the same location. Although i have Winzip in my system, i am unsure that will it be available in the system we going to use this. Is there is any general way to extract without using 3rd party software.
Question 2: I have script to open a folder which has password. But the Test complete script records the password characters.... But i dont want the script to show the password character, Is there any way where we can encrypt this in script.
Original is "Call dlgnewfolder.Edit.SetText("cocunuttree")"
I need something like "Call dlgnewfolder.Edit.SetText("********")"
Thanks in Advance
Hi Rajesh,
the zip has password. so when i run the script i get a window popup asking for password.
The problem is that the object (Shell.Application) I used in the script below doesn't allow using passwords. So, you cannot modify it to accomplish the task you need.I have only two suggestions:
1. Search the VBScript forums for another approach that can be used to extract files from password-protected archives. Maybe, there is a solution, but, unfortunately, I don't know it.
2. As an alternative, you can use an additional tool (like WinZip, 7-Zip or another) and create a script that will call it from the command line with the needed parameters. I know that you didn't want to use this approach, but I cannot suggest you any alternative.