forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: St. Anger on August 22, 2007, 08:07:29 pm

Title: Delete files in /albums/ that are not used in the CPG database
Post by: St. Anger on August 22, 2007, 08:07:29 pm
I was using FTP to download some photos form my gallery and I noticed that there are a lot of duplicate files spread throughout the directories in /albums/.

For example, I noticed duplicates of some files that had been renamed, so not only was there a renamed file but a file with the original filename as well. Also, there were some photos that had apparently been uploaded but not added to albums, as they didn't appear anywhere in my gallery. Altogether, there must have been around 500 or so of these duplicate/unnecessary photos.

What I was wondering is this: is it possible to create a script that can be run from Admin Tools that would detect and delete files in the /albums/ directory and its sub-directories that are unused by CPG (in other words, the files aren't viewable in the gallery, the files simply exist on the server)?
Title: Re: Delete files in /albums/ that are not used in the CPG database
Post by: Joachim Müller on August 23, 2007, 06:49:47 am
Possible. Valid suggestion imo. Marking thread accordingly.