Forum Discussion
sergi
12 years agoContributor
Thanks for the code Irina.
If anyone's interested, here it is in JScript.
//Specifies the location of the zip file.
var ZipFile = "D:\\Test\\Test.zip";
//Specifies the folder the contents should be extracted to.
var ExtractTo = "D:\\Test";
// If the extraction location does not exist, create it.
var fso = new ActiveXObject("Scripting.FileSystemObject");
if ( !fso.FolderExists(ExtractTo) ){
fso.CreateFolder(ExtractTo);
}
//Extract the contents of the zip file.
var objShell = new ActiveXObject("Shell.Application");
var FilesInZip = objShell.NameSpace(ZipFile).Items();
objShell.NameSpace(ExtractTo).CopyHere(FilesInZip);
fso = null;
objShell = null;
If anyone's interested, here it is in JScript.
//Specifies the location of the zip file.
var ZipFile = "D:\\Test\\Test.zip";
//Specifies the folder the contents should be extracted to.
var ExtractTo = "D:\\Test";
// If the extraction location does not exist, create it.
var fso = new ActiveXObject("Scripting.FileSystemObject");
if ( !fso.FolderExists(ExtractTo) ){
fso.CreateFolder(ExtractTo);
}
//Extract the contents of the zip file.
var objShell = new ActiveXObject("Shell.Application");
var FilesInZip = objShell.NameSpace(ZipFile).Items();
objShell.NameSpace(ExtractTo).CopyHere(FilesInZip);
fso = null;
objShell = null;
Related Content
- 8 months ago
- 3 years ago
- 4 years ago
- 7 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago