coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: crazycordy on June 13, 2013, 06:00:40 AM

Title: Delete every other file?
Post by: crazycordy on June 13, 2013, 06:00:40 AM
I'm not sure if this is possible, but I have coppermine installed on a fansite I run, (grimm-fan.com/gallery) and I currently have around 2,200 photos in my screencaps albums.  I'm hoping to reduce the number of photos in half to save disk space, and I would really like to do it without having to delete my files and re-upload the smaller amount. 

Is there any way to delete every odd/even numbered file or every other file within coppermine? I know I could delete them within FTP, but then how would I get rid of the empty files showing up in the albums? 

I'm prepared to re-do everything, I just thought I would see if anyone knows a better way to accomplish this.

Thanks :)
Title: Re: Delete every other file?
Post by: ΑndrĂ© on August 28, 2013, 12:05:44 PM
Coppermine uses a database which links the actual picture files to the albums. So you'd need to delete the picture references from the database and the file system (FTP). I hadn't looked closer at your gallery, but if your files contain a prefix/suffix with a number, it's easy to remove the pictures from the database in batch. If you've just FTP access to your server, it's probably more effort to remove them, unless you know an FTP client which supports such tasks.