Mass-remove unwanted char from filenames Mass-remove unwanted char from filenames
 

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

Mass-remove unwanted char from filenames

Started by Tragamin, June 22, 2009, 07:12:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tragamin

Hi everyone.

I'm currently having a problem with my coppermine gallery: someone uploaded a batch of files with the character "%" in its filenames; this normally wouldn't be an inssue, but the thing is I use a little script to show random Coppermine images on my vBulletin installation, and the "%" in those files forces it to display a link rather than the actual image - which in turn is unaesthetically stretching my board's tables.

I tried adding % to the list of forbidden characters but it has no effect. Is there any other way I could do this without having to rename them one by one? It's over a hundred files we're talking about  :'(

Thank you so much in advance.

St. Anger

If they're all in the same album, you can use this modified version of editpics.php to rename the images. You'll still have to rename each one, but rather than editing them page by page you can edit 25-100 on one page at the same time, so it should only take a few minutes to finish renaming them all.

Just upload the page in Coppermine's root directory, then go to your gallery and click on "Edit Files" next to the album where the images are located. You'll see there is now a place to edit the filenames, unlike before (why there isn't one in the first place I don't know, there really should be). I paid $15 to have this handy little modifcation created. Feel free to use it.