In alt.msdos.batch.nt message <cDkfrEaQ...@invalid.uk.co.demon.merl
yn.invalidmerlyn.demon.co.uk>, Tue, 11 Aug 2015 22:43:44, Dr J R
Stockton <
J.R.St...@physics.org> posted:
>This concerns another aspect of moving from Windows 3/98/XP to 64-bit
>Windows 7.
>
>For another form of backup/transfer, using in a batch file the
>"command"s ZIP and UNZIP. That system dates from about 1998. I have
>realised that those "command"s use an ancient ZIP package, perhaps
>recommended by Timo in about 1998, and using 16-bit code.
>
>So I need a new command-line ZIP and UNZIP, preferably 32-bit code,
>preferably with the same arguments as whatever I now actually use.
>
>Part of a ZIPping batch file is
>
> del progging.zip
> ZIP progging pas*.htm bat*.htm ????calc.htm prog2000.htm -x $*.*
> ZIP progging tmt*.htm del*.htm r_r*.txt index.htm t?c.htm -x $*.*
>
>I also use UNZIP -L filename .
>
>Any suggestions as to what I should use and where to download it from?
Well, I eliminated any suggestions that got me confused (directly or
indirectly), and, being left with nothing, looked around the Web again.
I found, at
<
http://stackoverflow.com/questions/27273334/batch-script-to-zip-a-
folder-without-using-external-softwares?lq=1>
a batch file (my version is ZYP.BAT) that incorporated and called
JScript code which included the lines
zip = shl.NameSpace(fso.GetFile(outfile).Path);
....
zip.CopyHere(zipThis);
That works in WinXP and Win7, so maybe it works in Win10.
It is slower than my earlier method, and does compress quite so much,
but those do not matter. Windows itself decompresses - not with the
convenience of Batch, but I expect to decompress very infrequently.
8<----
@if (@a==@b) @end /* JScript ignores this multiline comment
:: :: BATCH SETUP CODE
cscript /nologo /e:Jscript "%~f0" !args!
goto :EOF
:: end of batch portion / begin JScript portion */
JScript compression code
---->8
So part of the corresponding command-line batch file is
@del PRGGNG.ZIP
@del $$PRGG??.ZIP 2> nul
CALL ZYP -o $$PRGG01.ZIP index.htm t?c.htm inc-*.js styles-a.css
CALL ZYP -o $$PRGG02.ZIP pas-*.htm
CALL ZYP -o $$PRGG03.ZIP pascal.htm bat*.htm ????calc.htm prog2000.htm
CALL ZYP -o PRGGNG.ZIP PRGGNG.BAT $$PRGG??.ZIP
So far, all is well enough.
--
(c) John Stockton, Surrey, UK. 拯
merlyn.demon.co.uk Turnpike v6.05 MIME.
Merlyn Web Site < > - FAQish topics, acronyms, & links.