Parameter |
Description |
Settings |
---|---|---|
old-name | Specifies the name of a file or folder. |
The value is a string of 1 to 64 case-insensitive characters without spaces in the [ drive ] [ path ] filename format. 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: ~ * / \ : ' " |
new-name | Specifies the new name of the file or directory. |
The value is a string of 1 to 64 case-insensitive characters without spaces in the [ drive ] [ path ] filename format. 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
You must rename a file or directory in its source directory.
If the renamed file or directory has the same name as an existing file or directory, an error message is displayed.
If you specify old-name or new-name without specifying the file path, the file must be saved in your current working directory.
# Rename the directory mytest to yourtest in the directory flash:/test/.
<HUAWEI> pwd flash:/test <HUAWEI> rename mytest yourtest Rename flash:/test/mytest to flash:/test/yourtest ?[Y/N]:y Info: Rename file flash:/test/mytest to flash:/test/yourtest ......Done.
# Rename the file sample.txt to sample.bak.
<HUAWEI> rename sample.txt sample.bak Rename flash:/sample.txt to flash:/sample.bak ?[Y/N] :y Info: Rename file flash:/sample.txt to flash:/sample.bak .......Done.