![]() For example, the command shown below will archive all files ending in.h which are in c:\msdev\include\, c:\msdev\include\sys, and c:\msdev\include\gl (assuming these directories exist on your system). Recursive directory search Cabarc can archive files in a directory and all of its subdirectories, by use of the r option. ![]() ![]() For example: cabarc p P mysrc\ P yoursrc\ n mycab.cab c:\mysrc\myproj\*.* d:\yoursrc\yourproj\*.c The trailing slash at the end of the path name is important entering P mysrc instead of P mysrc\ would cause files to be added as \myproj\. The P option may be used multiple times to strip out multiple paths cabarc builds a list of all paths to be stripped, and applies only the first one which matches. Any absolute path prefixes such as c:\ or \ are stripped before the comparison takes place, so these characters should not be included in the P option. cabarc p P mysource\ n mycab.cab c:\mysource\myproj\prog.c of 8 March 20, 1997ĥ The P option strips any strings which begin with the provided string (wildcards are not supported in this case it is a simple text match). This can be accomplished with the path stripping option, -P (capital P). For example, one might wish to archive everything in the c:\mysource\myproj\ directory, but store only the myproj\ component of the path. Path stripping In many situations it may be desirable to preserve some of the path name, but not all of it. Note that the c:\ prefix is still stripped from the filename cabarc will not allow absolute paths to be stored in the cabinet, nor will it extract such absolute paths. For example, the following command will result in the filename prog.c being stored in the cabinet: cabarc n mycab.cab c:\source\myproj\prog.c In order to preserve path names, the p option should be used: cabarc p n mycab.cab c:\mysource\myproj\prog.c This command will cause the file to be named mysource\myproj\prog.c in the cabinet. Path name preservation By default, directory names are not preserved in the cabinet only the filename component is stored. It is possible to tell cabarc to begin a new folder, by inserting the plus ( ) symbol as a file to be added, as shown below: cabarc n mycab.cab test.c main.c test.exe *.obj The above command creates the cabinet mycab.cab with one folder containing test.c and main.c, and a second folder containing test.exe and all files matching *.obj. Wildcards Cabarc supports wildcards in the filename list, as shown in the example below: cabarc n mycab.cab prog.* readme.txt Folders By default, all files are added to a single folder (compression history) in the cabinet. ![]() of 8 March 20, 1997Ĥ Creating cabinets Cabinets are created using the n command, followed by the name of the cabinet to create, followed by a filename list, as shown below: cabarc n mycab.cab prog.c prog.h prog.exe readme.txt The above command creates the cabinet mycab.cab containing the files prog.c, prog.h, prog.exe, and readme.txt, in a single folder, using the default compression mode, MSZIP. Options must appear before the command name, and cannot be combined (for example, to set the r and p options, use r p, and not rp). These commands are described in the following pages. Command line usage Cabarc is used as follows: Usage: CABARC command cabfile Currently, only three commands are supported N (create new cabinet), L (list contents of an existing cabinet), and X (extract files from a cabinet). Cabarc supports wildcards and recursive directory searches. Cabarc Cabarc is a utility that creates, extracts, and lists the contents of cabinet files (CABs), using a command line interface similar to that of popular archiving tools. The downside is that random access time suffers, since in order for any particular file in a folder to be decoded, all preceding files in the same folder must also be decoded. By compressing files in this way, the compression ratio is improved. A folder is a collection of one or more files which are compressed together as a single entity. One key concept of the cabinet file is the folder. Depending upon the number of files to be compressed, and the expected access patterns (sequential or random access whether most of the files will be requested at once or only a small portion), cabinets can be constructed in different ways. The key features of the cabinet format are that multiple files may be stored in a single cabinet ( CAB file ) and that data compression is performed across file boundaries, significantly improving the compression ratio. 8 of 8 March 20, 1997ģ Introduction The cabinet format The cabinet format provides a way to efficiently package multiple files. Abstract This document is the user's guide for the Microsoft program CABARC.EXE, which can create, view, and extract from Microsoft cabinet files.Ģ Table of Contents INTRODUCTION.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |