Choose Refactor | Rename on the main or context menu or press
Shift+F6.
In Rename File dialog box that opens, specify the new file name.
Select Search in comments and strings checkbox to let CLion apply changes
to comments and strings.
Press Preview to observe possible changes
in Find Tool Window. Press Refactor to proceed.
CLion finds all the occurrences of the file name and changes them respectively. Example below represents
CMakelists.txt before and after Rename file refactoring: