Related links
Developer Resources
Listing
List file(s) / folder(s) on your IDrive account.
There are two ways to list files in your IDrive account.
1. List only first level file(s) / folder(s) hierarchy from the specified path
You can use
--auth-list parameter to list only first level file(s) / folder(s) hierarchy from the specified path.
Syntax:
idevsutil --xml-output --password-file=<account password> --auth-list <username>@<server address>::ibackup/<specify the path for listing the file(s) / folder(s)>
- --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>
- 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.
a. To list first level file(s) / folder(s) from your IDrive account root path:
Code:
idevsutil --xml-output --password-file="MyPassword" --auth-list john@<server address>::ibackup/
b. To list first level file(s) / folder(s) form the folder “/C/Images/” on your IDrive account:
Code:
idevsutil --xml-output --password-file="MyPassword" --auth-list john@<server address>::ibackup/C/Images/
2. Use
Search API to list all file(s) / folder(s) from the specified location.
- Code / Output management
-
This section explains you about the sample code execution and the output generated during listing.
To list first level file(s) / folder(s) form the folder “/C/Images/” on your IDrive account:
Code:
idevsutil --xml-output --password-file="MyPassword" --auth-list john@<server address>::ibackup/C/Images/
The above-mentioned code can be executed using any programming language across any platform (Windows, Mac and Linux).
Output:
Sample XML output:
<item restype="D" size="4096" file_ver="-" mod_time="2011/07/15 11:43:01" thumb="0" fname="="/C/Images"/>
<item restype="F" size="4096" file_ver="1" mod_time="2011/07/15 11:43:01" thumb="0" fname="="/C/Images/Image1.jpg"/>
Description:
The following details are displayed during listing operation:
- restype
Describes whether the resource is a folder or a file.
- size
Size of the particular file
- file_ver
Latest version available for the particular file
- mod_time
Modified date / time of the file
- thumb
To identify if the image file has a thumbnail display
- fname
File / Folder name
You can make use of I / O redirection methods for redirecting IDrive EVS command line utility (idevsutil) output.