Skip to end of metadata
Go to start of metadata

Script created by: Shawn Penner, SAP


  • This script loops through the input and output FRS and looks for any orphan objects.  If it finds any, it deletes them.

NOTE: This sample is destructive. It deletes files.  It is strongly recommended that you make a backup of your CMS database and your Input and Output FRS before running it in Delete mode.

EXTRA NOTE: Due to how objects in the recycle bin are handled by Enterprise, this sample will not detect recycled objects as valid and will delete the associated files.  It is strongly recommended that you empty the recycle bin before running the sample.


  1. Copy the jsp page into the folder C:\Program Files (x86)\SAP BusinessObjects\tomcat\webapps\AdminTools
  2. Edit the file and change the values in the following section:

    Boolean Run_In_Test_Mode = true; 
    -If set to True, it will just list the files it would have deleted, but won't actually delete them.
    -If set to False, it will list the files and actually delete it.  By default this is set to true.

    Note: true and false are Case Sensitive.  You must use the values of "true" or "false".  Do not use "True" or "False"

    String pathToInputFRS = "C:\\Program Files (x86)\\SAP BusinessObjects\\SAP BusinessObjects Enterprise XI 4.0\\FileStore\\Input";
    String pathToOutputFRS = "C:\\Program Files (x86)\\SAP BusinessObjects\\SAP BusinessObjects Enterprise XI 4.0\\FileStore\\Output";
    -This is the path to the FRS folders.  Because this is java, all slashes must be double slashes and there should not be a slash at the end of the file path.

    String fileToLogTo = "C:\\Program Files (x86)\\SAP BusinessObjects\\tomcat\\webapps\\AdminTools\\TestOutput.txt";
    -This is the path and filename of the logging file it will create.  If the file already exists, it will append the new logs to the end.  It will not over-write the log file.

    // User Credentials
    String username = "Administrator";
    String password = "Password1";
    String cmsname = "localhost";
    String authType = "secEnterprise";
    -The logon credentials for the Enterprise server.  You MUST use the Administrator user for this.  The script requires the ability to verify if an object exists.  If the account does not have the rights to see the object, it will assume it does not exist and delete it.

  3. Open up a browser and go to http://myserver:8080/AdminTools/scanFRS.jsp


You can download the script from Kbase 2827214 - Sample to Remove Orphaned files from the Input and Output FRS


  • No labels


  1. Interesting-- thanks for sharing!

    Curious what sparked the creation of this script?

    Do we find that there are a large amount of orphans that the system generates?

    Is this done solely to free up hard drive space or do these orphans create other problems?

    Just a comment about implementation - our FRS is not accessible from the web application, but I could adopt a version of this in .NET to run, just trying to realize the benefits.

    1. What sparked the creation of this was two things:

      1. I wrote a version of this for XI 3.1 in vbs, but vbs is no longer supported in BI 4, and trying to make the VBS version work in BI4 would have been pointless
      2. I had a customer who was running into a bug which was causing their FRS to fill up and they were running out of hard drive space.  Development wasn't going to be able to get a fix to them in a timely manner, so I figured I'd see if I could come up with something.

      This is done purely to free up hard drive space.  The orphans should not create any other issues.

      The main trick to this sample is the knowledge that if a folder contains any files, then the folder name is the SI_ID of the object.  So you just need to do an infostore query to see if that object exists.  For that reason you must run this as administrator - otherwise the user you use may not have rights to see all objects and would delete an object that does exist.