Related links
Developer Resources
Rename
Rename file(s) / folder(s) on your IDrive account using
rename API.
Syntax:
idevsutil --xml-output --password-file=<account password> --rename --old-path=<file/folder path> --new-path=<file/folder path> --pvt-key=<key file path> <username>@<server address>::ibackup/
-
--pvt-key=PATH_OF_PVT_KEY_FILE
Reads private encryption key for AES 256-bit encryption for all data transfers. The length of the private encryption key can vary from 4 characters to a maximum of 255 characters. If you opt for the default encryption key during your IDrive account sign up then the use of the private encryption key is not required.
- --password-file=PATH_OF_PSWD_FILE
Reads account password from the specified file. Alternately, you can directly set the password using --password-file=<account password>
- --old-path=FILE PATH
Provides the file / folder path name that you wish to rename.
- --new-path=FILE PATH
Provides a new name for the file / folder that you wish to rename.
- Username:
IDrive username. If you do not have a valid username Sign up with IDrive
- Server address
Use GetServerAddress API to retrieve the IDrive server address.
- Code / Output management
-
This section explains the sample code execution and the output generated during rename operation.
To rename a file/folder in your IDrive account
Code:
idevsutil --xml-output --password-file="MyPassword" --rename --old-path=/C/originalfile.doc --new-path=/C/newfile.doc --pvt-key=enc_key john@<server address>::ibackup/
Output:
Sample XML output:
<item op_status="success" oldname="/C/originalfile.doc" newname="/C/newfile.doc"/>
Description:
The following details are displayed during rename operation:
- op_status
Status of rename operation
- oldname
Old file/folder path name
- newname
New file/folder path name
You can make use of I / O redirection methods for redirecting IDrive EVS command line utility (idevsutil) output.