16
Utilities
Using QMC's File Utilities
In this chapter you will learn:
t	The purposes of included file utilities.
t	About QMC's TAR/Compress Utility application.
t	How to create a TAR file to send several files as one attachment.
t	How to compress files before you send them.
t	How to decompress compressed files you receive.
t	How to extract files from a TAR file you receive.
t	How to rebuild QMC database files.
File Utilities
QMC includes several utilities which let you compress and decompress files and help you optimize its performance. 
There are three utilities routinely used by people working on UNIX based systems when they send files via the Internet: 
t	Uuencode and UudecodeUuencode converts a binary file to an ASCII file. Only files in ASCII format can be sent via Internet e-mail, so binary files must be uuencoded before they can be sent. Uudecode converts an ASCII file back to a binary file once it is received.

The Message Center automatically converts binary files to ASCII files when you attach them to messages and converts ASCII files back to binary files when you detach them from messages. You do not have to take any additional steps to convert files once you attach or detach them.

For more information on attaching files, see "Attaching/Sending Files" on page 115.
t	TARTAR combines two or more files into one compacted file which can be sent across the Internet more conveniently. You can access and use all the files in a TAR file you receive by extracting them with the TAR/Compress Utility application.
t	CompressCompress reduces the size of an individual file so it can be sent across the Internet more quickly. You can restore a compressed file to its original size by expanding it with the TAR/Compress Utility application.

Before you send a TAR file you have created you can also compress it to reduce its size. 

	If you are sending files to and receiving files from others who work on DOS based systems and generally exchange files in ZIP format, you can continue exchanging ZIP files by attaching them to messages. You will only need to use the TAR/Compress Utility application to exchange files with UNIX system users who rely on TAR and Compress. You can of course use TAR/Compress for convenience in compacting and compressing files, even if you are exchanging files with others on DOS based PCs, as long as those users also have access to TAR and Compress utilities.
The TAR/Compress Utility Application
The TAR/Compress Utility program is a separate application which you can open from QMC or from Windows. To open the TAR/Compress Utility application, shown in figure 78 on page 185, choose TAR/Compress from the Tools menu. Open this window whenever you need to:
t	Combine two or more files you want to send via the Internet into a new TAR file.
t	Extract files from a TAR file you have received from someone.
t	Compress a file to reduce its size before you send it.
t	Expand a compressed file you have received to its original state so you can use it.

Figure 78: TAR/Compress Utility Application Window
The TAR/Compress Utility application includes some QMC features. You can:
t	Toggle the display of the toolbar and status line with commands on the Options menu.
t	Specify default options for TAR and compress with the Preferences command. 
t	Open and arrange multiple windows.
Creating a New TAR File
If you want to combine two or more files into a single file to send across the Internet, create a new TAR file which includes all the files you want to send.
To create a new TAR file:
1	Click the New button on the toolbar or pull down the File menu and select New TAR. A new window opens where the contents of the TAR file will appear.
2	Click the Add button on the toolbar or pull down the Edit menu and select Add Files. The Add Files dialog box opens where you can select the files to include in the TAR file.
3	Select each file in the File Name list box and choose OK. The files you select appear in the TAR window.
4	Repeat steps 2 and 3 to add all the files you want to include in the TAR file.
5	Click the Save button on the toolbar or pull down the File menu and select Save TAR. The Save TAR As dialog box opens where you can specify the name for the TAR file.
6	Enter a name for the file in the File Name text box and choose OK.
The file is saved and the filename appears in the window title bar. 
While the file is still open, you can modify it by adding additional files or removing files, and then either save it under the same file name or give it another name. Follow the previous steps to add additional files.

Once you create a TAR file, then close and reopen it, you cannot add or remove files.
To remove files from the TAR file:
1	Select the files to remove in the file list.
2	Click the Delete button on the toolbar or pull down the Edit menu and select Delete Files. 
The file is deleted from the TAR file only. The source file is not deleted from your hard disk.
3	Click the Save button on the toolbar or pull down the File menu and select Save TAR to save this modified version of the TAR file.

To save the modified TAR file with a new filename choose Save TAR As from the File menu.
Compressing a File
You can compress a TAR file or any other file you plan on sending via the Internet in order to make it smaller. A smaller file is sent and received more quickly.
 To compress a file:
1	Click the Compress button on the toolbar or pull down the File menu and select Compress File.
The Compress File dialog box opens where you can select the file.
2	Select the file in the File Name list box and choose OK. 
The file you selected is compressed. 

To conform to UNIX conventions, the last letter in the filename's extension changes to Z by default. For example, if you compress a file named EXAMPLE which has no extension, it is saved as EXAMPLE.Z. If you compress a file named EXAMPLE.TAR, it is saved as EXAMPLE.TAZ.
Expanding a File
When you receive a compressed file, you will need to expand it before you can work with it.
To expand a file in the TAR/Compress Utility window:
1	Click the Expand button on the toolbar or pull down the File menu and select Expand File.
The Expand File dialog box appears so you can select the file.
2	Select the compressed file in the File Name list box and choose OK. 
The Expanded File As dialog box opens, where you can specify the name for the file. The original name of the file appears in the File Name text box.
3	Enter a new name for the file or accept the one shown and choose OK. The compressed file expands to its original state.
If the expanded file is a TAR file (it will have a .TAR extension when you expand it), you will also have to extract the files from it in order to work with them, as explained next.
Extracting Files
When you receive a TAR file, you will need to extract the files from it before you can work with them.
To extract files in the TAR/Compress Utility window:
1	Click the Open button in the toolbar or pull down the File menu and select Open TAR. 
The Open TAR dialog box appears where you can select the file.
2	Select the TAR file in the File Name list box and choose OK. The contents of the TAR file appear in the window.
3	Select one or more files from the list.
4	Click the Extract button in the toolbar or pull down the File menu and select Extract Files. The Extract Files dialog box, shown in figure 79, appears where you can specify the destination and options.

Figure 79: Extract Files Dialog Box
5	Select the destination in the Directories list box or enter the destination in the Extract To text box.
6	Check the Use Directory Names option if you want to extract the files with their original directory structure.
7	Choose whether to extract either the selected files or all the files in the TAR file. If you previously selected all the files in the TAR/Compress Utility window, the All Files option will be selected by default.
8	Check the Overwrite Existing Files box if you do not want to be prompted before overwriting existing files.
9	Click the Extract button to extract all the files to the destination.
Rebuilding QMC Database Files
The Databases tool repairs and compresses the QMC databases to optimize performance and hard disk space usage. It is sometimes necessary to repair the databases if your system crashes or hangs while records are being written to the databases. Databases repairs and compacts the message file, address book, and news server databases. Over time, as messages, address entries, newsgroups and folders are added and deleted, unused areas are left in the database files making them larger than they need to be. You can reduce their size by compacting them.
The Databases dialog box provides the options that control how QMC repairs and compacts. If you are prompted to rebuild the QMC databases, choose the recommended option and then click OK.

The options are described in detail in the online help.
