Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Delete files in /albums/ that are not used in the CPG database  (Read 5529 times)

0 Members and 1 Guest are viewing this topic.

St. Anger

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 107

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)?
« Last Edit: August 23, 2007, 06:50:07 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Delete files in /albums/ that are not used in the CPG database
« Reply #1 on: August 23, 2007, 06:49:47 am »

Possible. Valid suggestion imo. Marking thread accordingly.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.