1
                                                                    Exhibit 5.1


                                 PIPER & MARBURY
                                     L.L.P.
                           1200 NINETEENTH STREET, N.W.            BALTIMORE
                           WASHINGTON, D.C. 20036-2430              NEW YORK
                                   202-861-3900                   PHILADELPHIA
                                FAX: 202-223-2085                    EASTON


                                 July 2, 1998



FileTek, Inc.
9400 Key West Avenue
Rockville, MD  20850

Gentlemen:

      We have assisted in the preparation and filing with the Securities and
Exchange Commission of a Registration Statement on Form S-1, file No. 333-_____
(the "Registration Statement"), relating to ______ shares of Common Stock
(including ______ shares to cover over-allotments, if any), $.01 par value per
share, of FileTek, Inc., a Delaware corporation (the "Company"), to be offered
to the public.

      We have examined the Amended and Restated Certificate of Incorporation and
the Bylaws of the Company, and all amendments thereto, and have examined and
relied upon the originals, or copies certified to our satisfaction, of such
records of meetings of the directors and stockholders of the Company, documents
and other instruments as in our judgment are necessary or appropriate to enable
us to render the opinions expressed below.

      In examining the foregoing documents, we have assumed the genuineness of
all signatures and the authenticity of all documents submitted to us as
originals, the conformity to original documents of all documents submitted to us
as certified or photostatic copies, and the authenticity of the originals of
such latter documents.

      Based on the foregoing, we are of the opinion that the shares of Common
Stock have been duly authorized for issuance and, after payment therefor in
advance and in accordance with the terms and provisions of the Underwriting
Agreement among the Company, NationsBanc Montgomery Securities LLC, BancAmerica
Robertson Stephens and First Albany Corporation and issuance of the certificates
therefor by the Company, will be duly and validly issued, fully paid and
nonassessable.

   2


                                                                 Piper & Marbury
                                                                       L.L.P.

FileTek, Inc.
July 2, 1998 
Page 2




      We hereby consent to the use of our name in the Registration Statement and
under the caption "Legal Matters" in the related Prospectus and consent to the
filing of this opinion as an exhibit to the Registration Statement.

                                    Very truly yours,