Mort-lemur Posted November 10, 2013 Posted November 10, 2013 Hi, Quick question, Over the years I must have deleted many products from my stores, but left the images on the server. Is there any way to access the server and see the contents of the images directory as pictures and allowing me to delete the ones I dont need anymore by highlighting and deleting? I know there are contributions to remove unused images, but the ones I have do not take account of extra images. I also know I can view the contents by name on programmes such as Filezilla etc, and I can also download to a desktop and then delete / re-upload, but is there an easier way. Thanks Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
MrPhil Posted November 10, 2013 Posted November 10, 2013 If you know the location and names of the image files, you can call them up directly in the browser to look at them. As far as determining which ones are in use, that's presumably stored in a product images table (and/or a product information table, image field), depending on if you have multiple images per product. You could use phpMyAdmin to dump that table to a CSV file and compare it to a list of images -- whatever's not in both can presumably be deleted. Just be careful to confirm that these are only product images, and there aren't any store icons etc. mixed in.
stragami Posted November 10, 2013 Posted November 10, 2013 to clear up your image folder look for http://addons.oscommerce.com/info/6346 (only osc 2.2.) but its a great tool! delete imges which are not in use shpo all producs where imaes are missing in folder images
Mort-lemur Posted November 10, 2013 Author Posted November 10, 2013 @@MrPhil@@stragami I know how to delete images with filezilla and I already have that contribution - but like I said it does not cater for additional images. My question was: is there any software that will allow me to view all the images on the server as pictures rather than as filenames? eg as per filemanager on my desktop? I could then select and delete any that are blatantly no longer in use (from my memory) Thanks Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
burt Posted November 10, 2013 Posted November 10, 2013 Simplest option is to make a PHP script to grab the content of the images dir and output to a page, along with a checkbox per image and an "action" that deletes the selected images. http://uk.php.net/glob http://uk.php.net/manual/en/control-structures.foreach.php http://uk.php.net/unlink That's a good starter for someone to create such a script.
MrPhil Posted November 10, 2013 Posted November 10, 2013 (from my memory) Quite dangerous. You just know you're going to end up deleting an active product's image. You're much better off getting a list of images, a list of active products' images, and cross referencing them. More work than just looking at images and pressing a button to delete them, but more thorough and safer. Using a PC editor, you can turn the list of images into a batch file or shell script to erase all the extra files.Then remember to keep up with image files as you delete products.
Mort-lemur Posted November 10, 2013 Author Posted November 10, 2013 @@burt@@MrPhil OK I may look at adding the image somehow to my modified version of Gary's Product Monitor - that way I will have all the info I need in one place with the ability to delete the image if it is not associated with an active product. Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.