| Parameter | Description | Value |
|---|---|---|
old-name |
Specifies the original name of the source file or directory on the SFTP server. |
The name is a string. The absolute path of the file or directory ranges from 1 to 64 characters without spaces. |
new-name |
Specifies the new file or directory name. |
The name is a string. The absolute path of the file or directory ranges from 1 to 64 characters without spaces. |
You can run the rename command to rename any file or folder in the current directory.
After being renamed, the original file or directory name automatically becomes invalid. Files in the renamed folder, however, are unaffected.
# Rename the file in the authorized directory on the SSH server.
<sysname> system-view [sysname] sftp 10.1.1.1 Please input the username:client001 Trying 10.1.1.1 ... Press CTRL+K to abort Enter password: sftp-client> rename 222 111 Warning: Rename /222 to /111? [Y/N]: y Info: Succeeded in renaming file.