Creating and opening asset archives by using the asset archive tool

You can use the Rational® Asset Manager asset archive tool to run Java™ commands for creating or extracting compressed files, such as .zip or .jar files.

You might prefer to use a different archiving tool; however, in some cases, you must use the Rational Asset Manager archive tool. If a file name or its contents contain non-ASCII characters, such as Unicode symbols, other archive tools might not be able to transform these characters for Rational Asset Manager. When you submit files that contain non-ASCII characters, you must first run the archive tool to create a compressed file that is appropriate to submit to an asset.

Before you begin

Download the archive tool:
  1. Click the Help icon.
  2. Click Extensions.
  3. In the Archive Tool section, click Download.
  4. Save the RAMZip.jar file to your local system.

About this task

You run the archive tool from a command prompt by using Java commands. The following table shows the combinations of commands that you might use.

Table 1. Descriptions for archive tool options
Variable Description
-c Creates an archive.
-t Opens the table of contents for an archive.
-x Extracts all of the files from the archive.
-v Generates the verbose output.
-C -C targetDirectory: Extracts the files to a specified target directory

-C sourceDirectory: Compresses the files that are in the specified source directory

If you are using the same directory that contains the RAMZip.jar file, you do not need to include this option in your command.

Example

You want to attach an archive that contains an HTML file that uses non-ASCII characters. The name of the file is ¡example.html. If you compress this file by using the default compression tool for your operating system, the title of the file within the archive might be converted to another symbol, such as -example.html.

If you try to attach an archive that contains this HTML file to an asset, an error occurs and you cannot save the archive to the asset. Even if you can save the file, an error occurs when you try to download the file from the asset.

To create an archive without incorrectly transforming these characters, you can use the Rational Asset Manager archive tool.

Creating an archive

You can create an archive that contains the files and folders from a specified directory.

Procedure

  1. Open a command prompt.
  2. Change the directory to the location of the RAMZip.jar file.
  3. Enter this command: java -jar RAMZip.jar -v -c newArchive.zip readme.txt -C /source/folder , where:
    • newArchive is the name of the archive to create.
    • readme.txt is the name of the file to include in the archive.
    • source/folder is the directory that contains the files to compress.

Extracting files

You can use the archive tool to extract files from an archive.

Procedure

  1. Open a command prompt.
  2. Change the directory to the location of the RAMZip.jar file.
  3. Enter this command: java -jar RAMZip.jar -v -x myArchive.zip , where myArchive is the name of the archive to extract.
    • To extract files to a specific folder on your system, enter this command: java -jar RAMZip.jar -x myArchive.zip -C /target/folder, where /target/folder is the directory to extract the files to.

Opening a table of contents

You can view the files and folders that are in an archive by opening a table of contents in a command prompt.

Procedure

  1. Open a command prompt.
  2. Change the directory to the location of the RAMZip.jar file.
  3. Enter this command: java -jar RAMZip.jar -v -t myArchive.zip , where myArchive is the name of the archive to open the table of contents for. The contents of the archive are returned in the command prompt.

Feedback