Set native file size field v4

This Relativity script stores the native file size for each document in the workspace in a decimal field.

Special considerations

Consider the following when running this script:

  • The script cannot be undone.
  • The script may run for some time without reporting any progress.
  • The script updates the Document object. If you create a new field for the native file size, you must manually add it to your views to see the script results.
  • The script will only set the field if it is blank. It does not update or change existing file size field values.
  • When running this script against documents that do not have the file size field set, the file size value will be in kilobytes.
  • When running this script against documents imported through the Processing New Document option, the file size value will be in bytes.
  • Depending on the method used to upload or import files, you may see different file size formats (bytes or kilobytes.)
  • This script populates the file size field for any files, including third party documents not processed in Relativity, as well as those that were transferred into the workspace as Links only Natives via Integration Points.

Inputs

Before running the script, create a decimal field to store the script's native file size output. You can map to this field in the script. Be sure to add the field to your views to see the results.

Results

Once run, this script updates the Native File Size field with the file size for any document in the workspace. Note that there could be a mix of file size values in bytes and kilobytes.