home *** CD-ROM | disk | FTP | other *** search
- From: Sheldon.Sawatzky@f886.n2000.z12.misgate.gmi.org (Sheldon Sawatzky)
- Sender: uucp@misgate.gmi.org
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!col.hp.com!gmi!misgate!uucp
- Newsgroups: comp.sys.ibm.pc.misc
- Subject: Compress Huge File 1/3
- Message-ID: <724113082.F00004@misgate.gmi.org>
- Date: Thu, 10 Dec 1992 13:49:02 -0700
- Lines: 104
-
- HM>Does anyone know how to use compression like pkzip, arj, ahl, etc
- HM>to compress a huge file/directories (I know this part) and
- HM>then save them to disk?
-
- As others have already suggested, follow the instructions for using
- ARJ in this manner. Another suggestion for using PKZIP was posted
- in this conference. It is as follows:
-
- From: H. D. Knoble
- To: All
- Area: IBM.PC.MISC
-
- As it turns out, DOS (4.0 and 5.0 at least) BACKUP command tries to
- compress a bit the files it's backing up. If, however, the file is
- already highly compressed, e.g., a PKZIP (by Phil Katz) file, then
- DOS BACKUP will not change one bit in the file when it creates
- BACKUP.001, BACKUP.002, ... , except for splitting across diskette
- if necessary. Thus if one uses PKZIP indexed backup (by providing
- PKZIP with a file that contains only those filespecs that you wish
- to PKZIP) and PKZIP creates a ZIP file that BACKUP will backup to
- one diskette, then the file BACKUP.001 would in fact be also a ZIP
- file; e.g., PKUNZIP -v A:\BACKUP.001 | MORE will display its
- contents.
-
- Because so many people recently seem to be suffering the loss of
- personal data (versus re-installable files of a package they may use
- to create that personal data) I offer a simple code and
- documentation here, say ZBACKUP.BAT and ZBACKUP.HLP, to help some of
- you address this kind of painful experience. Unlike PSU mainframe
- computers, each person using a microcomputer is responsible for the
- integrity of their own personal files. Given an ASCII index file of
- DOS filespecs, ZBACKUP.INX, that you create, the actual code
- (including taking a snap-shot of DIR C:\*.*) amounts to four four
- DOS commands like (assuming enough space on C: to hold the zip
- file):
-
- DIR C:\ > C:\C-Disk.DIR
- PKZIP -a -P -J -w -z C:\ZBACKUP.ZIP C:\C-Disk.DIR @C:\ZBACKUP.INX
- BACKUP C:\ZBACKUP.ZIP A:
- ERASE C:\C-DISK.DIR
-
- Including documentation, some integrity checks, etc. the files, these
- four commands are implemented in ZBACKUP.BAT which is documented in
- ZBACKUP.HLP; an example of ZBACKUP.INX (the index file unique to each
- unique person's "critical" files) also follows. Each file appears below
- and is separated by a line of dashes (---'s). From PSUVM you can save
- this Netnews file that you are now reading on your CMS E-Disk by moving
- the cursor to the command line and issuing: SAVE ZBACKUP MEMO E from where
- you can then edit and download. The binary file ZBACKUP.ZIP containing
- these three files (4100 bytes long) also resides on the PSUVM Kermit
- Product Disk (which can be accessed by issuing the command: PRODUCT KERMIT
- downloaded and unzipped from there).
-
- --------------------------ZBACKUP.BAT follows-------------------------
- @Echo Off
- REM ***********************************************************************
- REM ROUTINE: ZBACKUP.BAT
- REM PURPOSE: PKZIP Backup all files specified in file C:\ZBACKUP.INX to
- REM C:\ZBACKUP.ZIP, then to 1.44M diskette using DOS BACKUP.
- REM PACKAGE: Backup of Personal PC files
- REM CALLS: PKZIP and DOS BACKUP command.
- REM FILES NEEDED: ZBACKUP.INX, ZBACKUP.HLP
- REM CALLED BY: ZBACKUP or ZBACKUP ? to display Help.
- REM MODIFY: A:, the floppy drive, may be changed to any desired drive.
- REM AUTHOR: H. D. Knoble, HDK@PSUVM, 02/13/92
- REM
- ************************************************************************
- if "%1" == "?" GoTo Help
- if "%1" == "" GoTo Next
- Echo .
- Echo $$Error: Invalid Syntax: %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
- Echo .
- GoTo Done
- :Next
- if exist C:\ZBACKUP.INX GoTo BackThem
- Echo .
- Echo $$Error: C:\ZBACKUP.INX not found.
- Echo .
- GoTo Done
-
- :BackThem
- REM a(add), P(include pathnames), J(don't mask hidden/system/ronly files)
- REM w(include hidden/system/ronly files), z(ask for zip comment).
- DIR C:\ > C:\C-Disk.DIR
- PKZIP -a -P -J -w -z C:\ZBACKUP.ZIP C:\C-Disk.DIR @C:\ZBACKUP.INX
- if errorlevel 1 GoTo WrapUp
- if not exist C:\ZBACKUP.ZIP Goto WrapUp
- Echo .
- Echo ZBACKUP: To bypass DOS BACKUP press Ctrl-Break at its prompt.
- Echo DOS BACKUP beginning now...
- BACKUP C:\ZBACKUP.ZIP A:
- if errorlevel 1 GoTo Done
- Echo .
- Echo You may now ERASE C:\ZBACKUP.ZIP after verifying C:\ZBACKUP.ZIP
- is backed up.
- Echo To verify this: issue DIR A:BACKUP.* for each diskette BACKUP
- called for;
-
- --CONTINUED...
-
- * OLX 2.1 TD * May peace and joy be yours this holiday season!
-
- * Origin: Taiwan Missionary BBS (12:2000/886.0)
-
-