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
- 3 years ago
- 4 years ago
- 2 years ago
Recent Discussions
- 9 hours ago
- 10 hours ago
- 16 hours ago