is there a convenient way to rename my images?

:wave: hello!
so, this is kind of hard to word in a way that’s good for searching… i would like to do some bulk renaming of images on my website for better organization. but this means i need to rename the images and change all the references to those images, separately?

like, i’ve got this page with all these gifs that say “help” for example;

i can bulk-rename all the images in the folder, but then i have to manually go through and check which one was which and type out the new name of the image…

is there some way to make it so that when i rename the file, it automatically changes the tags referencing the file as well? so for example i rename helpp.gif to “help1” and <img src="images/helpp.gif> updates into <img src="images/help1.gif"> automatically ?

vscodium’s find+replace doesn’t search the names of files, only the contents - so searching “helpp” and replacing that with “help1” would only affect the img src and not the file itself.

ugh i hope that makes sense?? this feels like something that’s solveable with code in some way, but i just can’t wrap my head around what to even google. i’ve been trying to search for a vscodium extension that can do this but either none exists or i don’t know enough to search for the right thing! if there’s some other program i could hop into to be able to do this that would be great!

If you’re comfortable with Python or Shell scripting, they would be well suited for a task like this. I’m not aware of any GUI apps or extensions that would do this (though that does not necessarily mean they don’t exist)

@yequari and @xixxii, this is something I would handle in Emacs dired. It will let you edit a directory listing as if it were a file with wdired, and then apply the changes.

Fortunately for you, @xixxii , there’s a VS code version of dired:

I can’t guarantee it’s any good; I don’t use VS Code.