orphaned files

I appear to have a bunch of orphaned image files (files that have been deleted from my database and cannot be found in searches but are in the “Files” folder of the database package).

What can I do about this? I’d like to purge all such files from the “Files” folder but cannot sort through the folder and test each one to see if it is still referenced in the database. Tried rebuilding but they are still there.

Any help would be much appreciated as these files are bloating my database document. Thanks.

There are only two solutions:

  1. Exporting the whole database and importing the exported stuff into a new database
  2. Writing a sophisticated script

Note: Rebuilding doesn’t touch the Files folder to ensure that everything’s still there if things shouldn’t work as expected.

To do this successfully would I follow these steps?:

  1. On the whole database goto File>Export>Files and Folders
  2. Create a new database
  3. File>Import>Files and Folders

Will any metadata be lost in the process? Thanks for the help.


No. The meta data will be preserved, that’s the job of the created DEVONtech_storage files. But you should compare the statistics (see File > Database Properties…) of the original and the new database carefully.

Thanks Christian, that is as I suspected, but I just wanted to double-check. I will archive the old database so I can always go back to it if I find I’m missing something later.


Ok did it successfully, I think. It is almost scary how much smaller my database file size is. The Files folder went from 1.1GB to just over 200MB!

An analysis of the database properties shows everything exactly the same with one minor exception: my images went from 452 (8 replicants) to 460 (no replicants). The images that were replicants seem to have just been duplicated. Not a big deal in my case, but you might test it on your end to see if its a bug.

What slightly concerns me is the dramatic drop in the Files folder size, it seems to have gathered a lot of unnecessary stuff over the last few years. Could this be somewhat related to old versions of DT, that, if I remember correctly, did not manage the Files folder very well?

A quick perusal of my new clean database appears to have everything intact, but my database is large so it’s hard to know for sure. I am archiving the old database, just in case I find that the import was not as successful as it appears to be.

You’re right, there were several minor bugs and that’s the most likely explanation. Another possibility is a crash while importing.