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: [Solved]: Mass delete pictures with file missing  (Read 4852 times)

0 Members and 1 Guest are viewing this topic.

Iced Coffee

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 128
[Solved]: Mass delete pictures with file missing
« on: September 27, 2009, 06:19:15 am »

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.
« Last Edit: September 27, 2009, 11:14:19 pm by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Mass delete pictures with file missing
« Reply #1 on: September 27, 2009, 11:46:05 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.
However, 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.
Logged

Iced Coffee

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 128
Re: Mass delete pictures with file missing
« Reply #2 on: September 27, 2009, 05:19:53 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.033 seconds with 19 queries.