[Solved]: Mass delete pictures with file missing [Solved]: Mass delete pictures with file missing
 

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

[Solved]: Mass delete pictures with file missing

Started by Iced Coffee, September 27, 2009, 06:19:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Iced Coffee

I have just moved from one host to another and before I move, I decided to remove half of the pictures I have no save storage. I deleted many pictures from their folders (on Windows), and of course all those files are missing from the gallery now. I have 56 albums and I know I can delete many files from the same album at a time. However, it should be good if there is some ways to delete all those missing files from the database at once? I know there is a function to delete all the comments from missing files, so I guess the rule is almost the same? Is there anyway I can delete the files from the gallery? Thanks.

My gallery: http://giadinhhanhphuc.net/anhgiadinh

Thanks.

Joachim Müller

Quote from: Iced Coffee on September 27, 2009, 06:19:15 AM
I deleted many pictures from their folders (on Windows)
That was a silly thing to do! You shouldn't have done that, especially since you're aware that now they are missing from within Coppermine.
Quote from: Iced Coffee on September 27, 2009, 06:19:15 AMHowever, it should be good if there is some ways to delete all those missing files from the database at once?
No, there is no such feature available, that's why you will run into a lot of extra work to get rid of the database records that point to missing files now. Once files exist in coppermine's database, they mustn't be tampered with with third party tools. You should have deleted them instead using the tools built into coppermine. It wikll be the easiest method if you restore the files you have deleted from a backup and then do as you should have done in the first place and delete the extra files using coppermine's tools.
If you decide to write a tool that does what you're asking for (check if a particular file that resides in coppermine's database still exists on file system level and delete it from the database if it doesn't along with all resized copies that might exist on file system level), then it would be great if you could donate that tool.

Iced Coffee

Quote from: Joachim Müller on September 27, 2009, 11:46:05 AM
That was a silly thing to do! You shouldn't have done that, especially since you're aware that now they are missing from within Coppermine.No, there is no such feature available, that's why you will run into a lot of extra work to get rid of the database records that point to missing files now. Once files exist in coppermine's database, they mustn't be tampered with with third party tools. You should have deleted them instead using the tools built into coppermine. It wikll be the easiest method if you restore the files you have deleted from a backup and then do as you should have done in the first place and delete the extra files using coppermine's tools.
If you decide to write a tool that does what you're asking for (check if a particular file that resides in coppermine's database still exists on file system level and delete it from the database if it doesn't along with all resized copies that might exist on file system level), then it would be great if you could donate that tool.

Yes Joachim, I know it's a bit silly, but I just like to delete pictures on windows as it is easier for me to preview the pictures and delete ones I want to delete. Anyway, what I was managing to do is I went to every single album and delete all the file without a thumbnail. I am not a coder so I just cannot write a tool to help myself. It takes a bit of my time but I have done it.

Thanks.