Delete files in /albums/ that are not used in the CPG database Delete files in /albums/ that are not used in the CPG database
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Delete files in /albums/ that are not used in the CPG database

Started by St. Anger, August 22, 2007, 08:07:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

St. Anger

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)?

Joachim Müller

Possible. Valid suggestion imo. Marking thread accordingly.