Object Archives
Object Archives enable you to work with compressed files without the extra steps of entering commands to archive and unarchive files before performing tasks such as opening, renaming, copying or saving the files. When objects are stored in an archive, the compression and decompression tasks are performed automatically.
Object Archives support the following file formats:
Archives are special file objects, but they behave much like OS/2 folders. You can store objects in an archive by dragging and dropping, and you can view the contents of an archive by double-clicking it.
Each archive format (ZIP, LHA, ZOO, and ARC) appears as a template in the Object Desktop folder.
To create an archive object, tear off a new object from one of the templates. The following figure shows an archive created from the EMPTY.ZIP template. You can change the archive name on the General page of the archive object's Settings notebook.
Overview
Creating Archives
Archive Templates
The archives function as folders. To archive a file or folder, drag and drop it on an archive. All archiving operations occur on a background thread, and are serialized to ensure file consistency. To extract files, simply drag them to a destination folder or your desktop.
You don't have to do anything with archived files that existed on your system before Object Desktop was installed. All existing archived files are displayed with the Object Desktop icons and can be moved, copied, and opened using the features described in this chapter.
The archive objects act as folders. To view the contents of an archive object, double-click it. The icons representing the compressed files are based on the applications associated with the files.
The status bar displayed at the bottom of the Object Archive view displays summary information about the number of objects contained in the archive, and the number of objects that are currently selected in the view.
You can access most Workplace Shell Context menu options directly from the object archive's pop-up menu. For example, to view a .CMD file (REXX script) from an object archive, simply choose Open, Text View from its pop-up menu.
To open an archived file, just double-click it. The file is unarchived automatically. Data files are opened in their associated applications; program files are launched.
To extract a file that is stored in an archive, simply open the archive and drag the file object to any folder or desktop. To extract all files in a folder, right-click an archive folder and choose Extract to Folder. To automatically extract a folder without typing anything, choose Auto-Extract. A new folder is created and is named Extracted:name of original archived folder. The files are then extracted to the new folder.
By default, Object Archives uses archive utilities found through your system's OS/2 program search path. However, to use an archive utility that is located in a directory that is not in the search path, you must specify the path on the Path page of the archive folder's Settings notebook. Do not include the utility's EXE file in the path.
To use the OS/2 search path, but not delete the path entered in the first field, mark the checkbox beside Use OS/2 Path.
Adding Files to an Archive
Opening Archives
Specifying Archive Settings
Note: An alternative to editing individual Path pages is to specify the path for all
archive utilities using the Master Setup Object's
Archive Defaults page. Refer to the
Getting Started chapter for details.
The path entered in the field is grayed out. However, if you later decide to use the path, just unmark the checkbox and the field is enabled once again.
The Path for Temporary Files field is used by object archives to place extracted archive objects while they are being edited. You may specify a path to a temporary directory using this field on the Path page. Alternatively, you can specify the path using one of the following methods:
1. The "TEMP=" environment variable in the OS/2 CONFIG.SYS file.
2. The "TMP=" environment variable set in the OS/2 CONFIG.SYS file.
3. The "Nowhere" directory specified by the OS/2 Workplace Shell object identifier, "<WP_NOWHERE>".
Capture and Display Output.
To enable diagnostics in the event that the Object Archive file operations do not succeed, mark the checkbox to capture and display the output of archive programs.
To delete an archive, drag it to the Shredder or choose Delete from the object's pop-up menu.
When an archive object is copied, the default behavior is the object is extracted automatically. To change the behavior, open the Options page of an archive object's Settings notebook.
Working with Archived Files
To display a confirmation dialog each time an extract is to take place via copy, mark
the radio button beside Prompt for Extract or Copy to
Folder.
To use the Workplace Shell default, which performs a standard copy, mark the third radio button.
To use the selected behavior for all archive objects, click the Set as Default button.
If you modify a data file, save it as you normally do in the application. When you close the file, it is automatically re-archived. All changes are saved in the updated, archived file.
Editing Archived Files
Customizing Archives
The default view of the contents of an archive object can be icons or details. Establish your preference on the Options page of an archive object's Settings notebook.
The Icon View style displays the icon and title of each object stored in the archive object. You may interact and view each archive element as a standard Workplace Shell object.
The Details View style displays objects as they would appear from the output of a command line archive program, including file compression ratios, date of the archived file and other useful archiver-related information.
To display icons in a smaller, compressed format, mark the checkbox beside Small Icon.
To use the selected icon view for all archive objects, click the Set as Default button. Changes are not reflected in an open archive. You must close and reopen the archive to see the new view.