Parameter | Description | Value |
---|---|---|
source-filename | Specifies the name of a source file to be compressed. | The value is a string of 1 to 160 case-insensitive characters without spaces in the format [ drive ] [ path ] filename. If the string is enclosed in double quotation marks (" "), the string can contain spaces. If the value is a file name, the value is a string of 1 to 64 characters. In the preceding parameter, drive specifies the storage device name, and path specifies the directory and subdirectory. You are advised to add : and / between the storage device name and directory. The directory name cannot contain the following characters: ~ * / \ : ' " |
destination-filename | Specifies the name of a destination file that is compressed. | The value is a string of 1 to 160 case-insensitive characters without spaces in the format [ drive ] [ path ] filename. If the string is enclosed in double quotation marks (" "), the string can contain spaces. If the value is a file name, the value is a string of 1 to 64 characters. In the preceding parameter, drive specifies the storage device name, and path specifies the directory and subdirectory. You are advised to add : and / between the storage device name and directory. The directory name cannot contain the following characters: ~ * / \ : ' " |
Usage Scenario
The following describes the drive name.
If devices are stacked, drive can be named as:
For example, slot2#flash: indicates the flash memory in slot 2.
Precautions
If the destination file path is specified while the file name is not specified, the designation file name is the same as the source file name.
The source file persists after being compressed.
Directories cannot be compressed.
# Compress file log.txt that is stored in the root directory and save it to the test directory as file log.zip.
<HUAWEI> dir Directory of flash:/ Idx Attr Size(Byte) Date Time FileName 0 -rw- 155 Dec 02 2011 01:28:48 log.txt 1 -rw- 9,870 Oct 01 2011 00:22:46 patch.pat 2 drw- - Mar 22 2012 00:00:48 test 3 -rw- 836 Dec 22 2011 16:55:46 rr.dat ... 65,233 KB total (7,289 KB free) <HUAWEI> zip log.txt flash:/test/log.zip Compress flash:/log.txt to flash:/test/log.zip?[Y/N]:y 100% complete %Compressed file flash:/log.txt to flash:/test/log.zip. <HUAWEI> cd test <HUAWEI> dir Directory of flash:/test/ Idx Attr Size(Byte) Date Time FileName 0 -rw- 836 Mar 20 2012 19:49:14 test 1 -rw- 239 Mar 22 2012 20:57:38 test.txt 2 -rw- 1,056 Dec 02 2011 01:28:48 log.txt 3 -rw- 240 Mar 22 2012 21:23:46 log.zip 65,233 KB total (7,288 KB free)