Sublime Forum

Batch rename html to php in sidebar possible?

#1

Hi,
Is there a way to select 200 html pages in the sidebar and change them into php without having to select the html pages one by one?
Regards & Thanks,
David

0 Likes

#2

I think you would end up writing your own script or using an existing external renaming tool (there should have been lots of them).

0 Likes

#3

I’m looking for something like Ctrl + D for the sidebar files.

0 Likes

#4

I don’t think there is such a functionality in ST and the sidebar API is quite limited. Since PHP is a superset of HTML, I would suggest you just find a renaming tool. It would be much faster than waiting an (not that decent) answer here.

0 Likes

#5

Thanks will look for one! David

0 Likes

#6

For Windows, Rename Master is pretty powerful as a standalone.

On Linux I prefer using ranger's bulkrename command, which opens the list of selected files in my editor of choice (Sublime Text) and lets me edit the file names as I desire.

And if it’s something simple like changing file extensions, a small fd or find command can also do the trick.

fd -e html -x mv {} {.}.php
0 Likes