EXHIBIT 5 Opinion of Brobeck, Phleger & Harrison LLP August 20, 1997 FileNet Corporation 3565 Harbor Boulevard Costa Mesa, CA 92626 Re: FileNet Corporation (the "Company") Registration Statement for Registration of 1,130,000 Shares of Common Stock Ladies and Gentlemen: We refer to your registration on Form S-8 (the "Registration Statement") under the Securities Act of 1933, as amended, of (i) an additional 600,000 shares of Common Stock for issuance under the Company's 1995 Stock Option Plan, (ii) an additional 150,000 shares of Common Stock for issuance under the Company's 1988 Employee Qualified Stock Purchase Plan, (iii) 300,000 shares of Common Stock for issuance pursuant to a Written Compensation Agreement between the Company and Mr. Lee D. Roberts and (iv) 80,000 shares of Common Stock for issuance pursuant to a Written Compensation Agreement between the Company and Mr. Ron L. Ercanbrack. We advise you that, in our opinion, when such shares have been issued and sold pursuant to the applicable provisions of the Company's 1995 Stock Option Plan, the Company's 1988 Employee Qualified Stock Purchase Plan, the Written Compensation Agreement with Mr. Roberts and the Written Compensation Agreement with Mr. Ercanbrack and in accordance with the Registration Statement, such shares will be validly issued, fully paid and non-assessable shares of the Company's Common Stock. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement. Very truly yours, /s/ BROBECK, PHLEGER & HARRISON LLP BROBECK, PHLEGER & HARRISON LLP II-8