• Resolved Girotest

    (@girotest)


    Hello,

    is it possible to bulk rename the file names in database if the files are physically not in uploads folder?

    I have a database with featured images that are linked to old file names and a backup of images with already renamed/right file names.

    So I just need to rename the file names to post-title.jpeg in the database, but it doesn’t work if the files are missing physically…

    Maybe a small change in the source code?

    Thank you, it would really help me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    It’s possible to force rename (so without the media entries to be linked to files which exist) with the Pro version only.

    You can also try to modify the plugin in order to do that, of course ??

    In the Pro version, the option is simply called “Force Rename”.

    Hi Jordy!
    Stupid question, but how do I force rename? I have the pro version and I’ve checked the force rename option.

    I’m working on a site with lots of old uploaded files with names containing diacritics which is encoded in some strange way. I’ve been digging deep into this and learned that I can’t rename them since the plugin is unable to find the file. Because of the encoding, the regex in the sensitive_file_exists() function doesn’t match even though the filename in the database looks exactly like the real name of the file.
    I’ve used this script to rename all files, but it doesn’t help as long as I can’t force rename them from the UI ??

    Thanks Jordy!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rename the file name in database even if the image does not exist’ is closed to new replies.