Is there a way to rename picture files once they have been downloaded? Better yet, does anyone know of a batch rename script that could change the name of all of the pictures in a particular folder?
I am running on an older version of gallery. I tried searching but didn't have any luck. Either of these would be of great help. Thanks for your help.
Posts: 3236
You mean something to rename them once you have downloaded them from gallery -> your home computer?
Once they are in gallery, I don't think there is an easy way to re-name them. If you want them to have special names, they should have them when you upload them. If you had the "rename" option set to, all your files will be named like "aaa.jpg" or "aab.jpg" and there isn't much to be done about it.
Posts: 49
Yes, I'm trying to rename pictures that are already loaded into my albums folder. There should be a way to create a rename picture script similar to the rename album script that currently exists in the album view. Once the script was created, i could just edit the view_album or view_photo code so that it would be available in the drop-down menu.
Does anyone have any ideas on the code needed for this type of script?
Posts: 3236
I spose its possible, but what would be the point? You can edit the title, description and summary... the file name is transparent to the end user, so why do you want to re-name it?
Posts: 27300
<<admin options>> dropdown select; edit captions.
Posts: 49
The filename appears in the url. For search engine purposes, I'd like to have more appropriate filenames.
E.g. instead of having a filename like 0234.jpg that has the url http://www.domain.com/gallery/0234
I'd like to have a filename like mona-lisa.jpg that has the url http://www.domain.com/gallery/mona-lisa
Since I already have hundreds of pictures uploaded, I'd like to be able to change the name instead of having to upload them all again.
Posts: 3236
Well, I have not ever seen a request like this before or a script / modification that would do it... so it looks like you would have to write this yourself. I believe it would involve modifying the .dat files as well as the actual file name. Of course, you would have to modify the .thumb. , .sized. and .highlight. image names as well.
I do believe that most search engines base their results more on the descriptions near/around the images than from their names. My gallery auto-renames all files to the "aaa" standard and I get plenty of hits from people searching for and finding images where the only description available was in the title / description of the sub-album itself.
Do you know which search engines have a strong need of a useful filename to be indexed?
Also, good luck with the script
Posts: 49
Most search engines give significance to url structure. You will be indexed either way, but to have better serps, filename/structure and important. I get the feeling that the rename script may be a daunting task. I was hoping to make the changes to improve my ranking in the yahoo and google image searches. I'll just concentrate on other optimization if the rename function is this troublesome.
Posts: 27300
I think it would be a big task. Even from a UI point of view.....You would have to have a thumb of the old image and its filename then beside or below have a form entry for the new filename.
Then as fryfrog said you would have to copy the original, thumb and resized images rebuild the album.dat file and then delete the old files.
All this while preventing other users from doing things to the album at the same time or you WILL get a corrupt .dat file.
The user would still have to type in the name of the file so I doubt that it would save a significant amount of time over re-adding the images with the proper name.
Dave
Posts: 49
Thanks guys for your input. I also thought about using mod rewrite to change the url to reflect the caption instead of the filename. That is probably a much easier solution. Any ideas on where I would change the mod rewrite code.
Posts: 219
Did anyone get anywhere with this? I've got about 120 images that really need renaming from PICT0105 etc, to something more meaningful for the search engines.
Thanks!
Posts: 3
I think SEO is currently the weakest part of Gallery. I did a big import from Flickr and all my flies are gibberish. I'd be happy with a way to make the title of a photo the image name, with - replacing spaces.