You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.4 KiB
67 lines
1.4 KiB
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" Content="Microsoft Developer Studio">
|
|
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
|
|
<TITLE>Document Title</TITLE>
|
|
</HEAD>
|
|
|
|
<BODY>
|
|
<SCRIPT LANGUAGE=javascript>
|
|
<!--
|
|
|
|
var g_cb;
|
|
|
|
function cb_onComplete( cb, hr )
|
|
{
|
|
if(hr == 0)
|
|
{
|
|
alert( "Done!" );
|
|
}
|
|
else
|
|
{
|
|
alert( "An error occured during compression: " + hr );
|
|
}
|
|
|
|
g_cb = null;
|
|
}
|
|
|
|
function button_exec()
|
|
{
|
|
// debugger;
|
|
|
|
g_cb = pchealth.CreateObject_Cabinet();
|
|
|
|
var fso = new ActiveXObject( "Scripting.FileSystemObject" );
|
|
|
|
var f = fso.GetFolder( idSrcFolder.value );
|
|
|
|
for(var fc = new Enumerator( f.Files ); !fc.atEnd(); fc.moveNext())
|
|
{
|
|
g_cb.AddFile( fc.item().Path );
|
|
}
|
|
|
|
g_cb.onComplete = cb_onComplete;
|
|
|
|
g_cb.Compress( fso.GetAbsolutePathName( idDstFile.value ) );
|
|
}
|
|
|
|
function button_abort()
|
|
{
|
|
if(g_cb != null)
|
|
{
|
|
g_cb.Abort();
|
|
}
|
|
}
|
|
|
|
//-->
|
|
</SCRIPT>
|
|
|
|
<LABEL FOR=idSrcFolder>Select the source folder: </LABEL><INPUT size=40 id="idSrcFolder"><BR>
|
|
<LABEL FOR=idDstFile >Select the destination file:</LABEL><INPUT type="file" id="idDstFile" ><BR>
|
|
|
|
<INPUT type="button" value="Start" onClick="button_exec();">
|
|
<INPUT type="button" value="Abort" onClick="button_abort();">
|
|
|
|
</BODY>
|
|
</HTML>
|