home *** CD-ROM | disk | FTP | other *** search
- //
- // CpWin.js
- //+
- // Copy tmp directory .BMP files to a storage.
- // Assumes the .BMP files are in c:\tmp and c:\tmp\Windows
- //-
- // rev 11/09/98 gls
- //
-
-
- // //////////////////////////////////////////////////
- function Show( pszText )
- {
- WScript.Echo( pszText );
- }
-
- // //////////////////////////////////////////////////
- function CopyTo( objStg, sStg, sFileSpec )
- {
-
-
- objStg.MkDir( sStg ); // make the directory needed!
-
-
- //
- // Scan the dir for files
- //
- var objDir = WScript.CreateObject( "gstg.dir" )
-
- objDir.Scan( sFileSpec );
- var cFile = objDir.getFileCount();
-
- for(iF=0; iF<cFile; iF++)
- {
- var sFile = objDir.getFile( iF );
- var sFileRoot = objDir.getFileRoot( sFile );
-
- var sStream = sStg + "\\" + sFileRoot;
-
- Show( "Copy " + sFile + " - " + sStream );
- objStg.CopyTo( sFile, sStream );
- }
-
-
-
-
- }
- // //////////////////////////////////////////////////
- function DoIt( sFile )
- {
- var objStg = WScript.CreateObject( "gstg.core" )
-
- objStg.Create( sFile );
-
- objStg.MkDir( "\\tmp" );
-
- CopyTo( objStg, "\\BmpsTmp", "c:\\tmp\\*.bmp" );
-
- CopyTo( objStg, "\\BmpsWin", "c:\\tmp\\Windows\\*.bmp" );
-
-
- objStg.Close();
-
- }
- // //////////////////////////////////////////////////
-
- DoIt( "tmp.stg" );
-
- // //////////////////////////////////////////////////
- // //////////////////////////////////////////////////
- // //////////////////////////////////////////////////
-