+

Search Tips   |   Advanced Search

Delete user files from the system

Use the FilesLibraryService delete commands to delete user files.

To use administrative commands, use wsadmin.sh.

This topic focuses on deleting libraries (sets of files) belonging to inactive users. Inactive users are users who were removed from the corporate user directory. When that directory is synchronized with the Connections application directories, the users are marked inactive and their libraries are marked as "orphans." For information on synchronizing directories and inactive users, see the section Manage users.

In the Files database context, a library is a set of files owned by a person or community. However, you should delete community libraries following steps in the topic Delete orphaned data.

  1. Start the wsadmin client.

  2. Start the Files Jython script interpreter :

      execfile("filesAdmin.py")

  3. Run this command to find out the total number of libraries whose owners were removed from LDAP:

      FilesLibraryService.getPersonalOrphanCount()

  4. Run this command to return a list of personal libraries whose owners were removed from the LDAP directory. Libraries belonging to inactive users are returned marked "orphaned":

      FilesLibraryService.browsePersonalOrphan(sortOption, sortAscending, pageNumber, itemsPerPage)

    where the sortOption parameter is a String value that specifies how to sort the list. Default is title, but we can use lastUpdate, size, createDate, or quotaPercentage.

    The sortAscending parameter is a String value that specifies whether the list sorts in ascending alphabetical order. This depends on sortOption. If sortOption is title, then this value is true; if sortOption any other value, then this value is false.

    The pageNumber parameter is the number of the page to return. For example, if the itemsPerPage value is 40, and pageNumber value is 2, the command returns items 41 to 80 (page 2) instead of 1 to 40 (page 1).

    The itemsPerPage parameter is the maximum number of policies to list per page. Default is 20.

    To print the results of this command to a text file, see the topic Print information returned by commands.

  5. Run one of these commands to delete libraries:

    • Run this command to delete a single library:

        FilesLibraryService.delete(String libraryId)

      where libraryId is the library id in UUID format:

        00000000-0000-0000-0000-000000000000

      The parameter is a String.

      Return a message the library with the id was deleted, or a failure message if it is not found.

    • Run this command to delete multiple libraries:

        FilesLibraryService.deleteBatch(String filePath)

      where filePath is a String the full path to a text file containing a list with a single library id per line in UUID format:

        00000000-0000-0000-0000-000000000000

      You must create the file and save it in a directory local to the server where we are running the wsadmin processor. The parameter is a String.

      Returns an exception and stops processing if any item is not found.


Parent topic:
Administer Files


Related:

Manage users


Related:

Delete orphaned data

Print information returned by commands

Start the wsadmin client