In order to use files in database federations, we propose to migrate file data into a relational database. Integrating the database in a federation is then well-understood. This procedure has the advantage that a "real" database is handled supporting transactions and SQL; files obtain a high-level interface for free. This paper presents a specification-based approach to support the process of migrating file data into a relational database, and vice versa. A specification language provides powerful concepts to describe the contents of files and directories. In contrast to similar work, directory structures are taken into account, because they contain useful semantics. Given some descriptive specification of file contents, an adapter is gener...