Finding the location of a stored file

Use the FilesUtilService.getFileById command to locate a file stored in a directory on a file system.

Before you begin

To use administrative commands, you must use the wsadmin client. See Starting the wsadmin client for details.

About this task

Files uploaded through the IBM® Connections Files component are stored on a shared file system, as described in the topic Installing IBM Connections 4.5.

This command can be useful when restoring backup versions of data. See the topic Backing up Files data for more information.

Procedure

  1. Start the wsadmin client.
  2. Start the Files Jython script interpreter using the following command:
    execfile("filesAdmin.py")
  3. Run the following command to locate a file stored in the file directory:
    FilesUtilService.getFileById("fileId")
    where fileID is the ID of a file stored in the database. The ID must be a string in the following standard Universally Unique Identifier (UUID) format: 00000000-0000-0000-0000-000000000000. For example:
    FilesUtilService.getFileById("34f29f8a-8dc9-47f4-bffa-88e93215d4fb")

    The command returns the file path as a string, even if the file is not in use.