Renaming a file in PyCharm

Renaming files in PyCharm is simple. You simply select Refactor > Rename when right-clicking on a file in the tree.

This will open a popup where you can type in the new filename. There are additional options when renaming, such as searching for references and in comments, strings, etc.

NOTE: While PyCharm is indexing files, the option is unavailable. Once indexing is finished (can take a while), it becomes available again (thanks @Eric_Sven_Puudist).


You can just choose the file and hit shift+F6 rename it then hit refactor

Tags:

Python

Pycharm