Bulk deleting images Bulk deleting images
 

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

Bulk deleting images

Started by Maxxxie, April 01, 2007, 01:35:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Maxxxie

Hi all,

I have a basic coppermine installation at http://pbss.aussieclans.com.  I use the batch add feature to add hundreds of pictures at a time.  This works just fine.  However, I want to remove pictures that are greater than X number of days old.  There doesn't seem to be a feature built in to do this.  Using the "edit pictures" GUI to remove pictures would be cumbersome, so I'd prefer a way to script/automate it.

If the answer is to edit the database directly, that's fine, but I would appreciate some guidance about which tables need to be touched.  Is it just the cpg1410_pictures table?  Or is there more?  Finally, in the cpg1410_pictures table, there are two fields which look like they relate to date/age.  One is mtime and the other is ctime.  mtime appears to contain timestamps, which is great, but many of these timestamps are 0000-00-00 00:00:00, which doesn't help me select files older than such-and-such a date.  The ctime field contains values such as 1173484779.  Is there documentation somewhere about what these values mean (or even doco on the database schema)?

Any suggestions would be greatly appreciated :)

Max

Stramm


Maxxxie

Really?  The edit pics function allows me to delete files, in bulk, based on the file age?  I'm not looking to delete all files, and I do not want to piecemeal select a hundred files by checking a hundred check boxes.

As I said in the original post, I'm looking to script/automate this process.  Can you assist?

Cheers,
Max.

Sami

ctime is upload time and it is Unix timestamp (created by php time() function)
so you can create a php file and create your delete db query by uisng date() and ctime value
‍I don't answer to PM with support question
Please post your issue to related board

Maxxxie