Command line utility (idevsutil) APIs

Development made easy: IDrive EVS APIs

Delete

Remove file(s) / folder(s) easily from your IDrive account using Delete API. This API helps you to clear storage space by deleting unwanted file(s) / folder(s). While deleting a particular file, all its previous versions will be deleted from the IDrive account.
Syntax:
idevsutil --xml-output --password-file=<account password> --delete-items --pvt-key=<key file path> --files-from=< path of filelist file > <username>@<server address>::ibackup/
  • --pvt-key=PATH_OF_PVT_KEY_FILE
    Reads private encryption key for AES 256-bit encryption for all data transfers. Private encryption key length can vary from minimum of 4 characters to 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>
  • --files-from=PATH_OF_FILE_LIST_FILE
    Reads list of files folders that you wish to delete from your IDrive account.
  • 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:
idevsutil --xml-output --password-file="MyPassword" --delete-items --pvt-key=enc_key --files-from=filelist john@<server address>::ibackup/
Code / Output management
This section explains about the sample code execution and the output, generated during delete.

To delete all the file(s) / folder(s) inside “/C/Images/” folder on your IDrive account.

filelist file content:
/C/Images/
Code:
idevsutil --xml-output --password-file="MyPassword" --delete-items --pvt-key=enc_key --files-from=filelist john@<server address>::ibackup/
The above-mentioned code can be executed using any programming language across any platform (Windows, Mac and Linux).

Output:
Sample XML output:
<item op="deleted" fname="/C/Images/Image1.txt"/>
<item op="deleted" fname="/C/Images"/>
<item tot_items_deleted="2"/>
<item op_end="End of operation"/>
Description:
The following details are displayed during a delete operation:
  • op
    Delete operation executed
  • fname
    Name of the file(s) / folder(s) deleted.
  • tot_items_deleted
    Total items deleted
  • op_end
    Specifies the end of operation

You can make use of I / O redirection methods for redirecting IDrive EVS command line utility (idevsutil) output.

Refer code repository for more details on usage / implementation.