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:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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.