Rename project folder
Answered
Neither renaming the project (File > Project Structure > Project name) nor the module (Refactor > Rename) changes the folder name at /Users/USERNAME/IdeaProjects.
Must it be done manually or is there a way in-app?
Please sign in to leave a comment.
You can rename from inside the IDE via "Project files" view of the project tool window:
I just tested on a new project. It was originally named "untitled" and I used Refactor to rename to "untitledRenamed", but the folder remained "untitled"; see attached screenshots.

See the top pink arrow on my previous screenshot.
It is needed to choose "Project files" in the dropdown where you have "Project"
Ah. That works. Thanks!
I'm using IntelliJ IDEA 2022.1 (Community Edition) and if I follow Konstantin's steps, clicking on the root directory named "Java-Tutorial-Expressions,-Statements,-Code-blocks,-Methods-and-more-Keywords-And-Expressions-Source-code" and choosing refactor/rename KeywordsAndExpressions, the end result is
Directory remains "Java-Tutorial-Expressions,-Statements,-Code-blocks,-Methods-and-more-Keywords-And-Expressions-Source-code", project name changes to "KeywordsAndExpressions"
Searching the project, I can see the new project name appears in .idea/modules.xml and .idea/workspace.xml
Ricardo,
Have you switched from "Project" to "Project Files"?
Hi @...
I tried your suggestion and after switching to project files and trying to rename the folder I get an exception
Could you please check error in idea.log ("Help | Show Log in...")?
I'm not sure which error could be related to it as the log is huge but I managed to figure out the reason. If the terminal is open on the bottom and you try to rename the project directory, it can't do it. Closing the terminal allowed it to rename the project directory.
There is a catch though. The mappings in remote hosts still point to the old directory and I had to manually alter them.
Also if the directory contains dots in the name, you need to click on the lower end because it shows a tree structure that doesn't actuallyexist
Thanks for information!
There is general issue about project renaming: https://youtrack.jetbrains.com/issue/IDEA-144652/Renaming-projects-and-modules-is-too-complicated
If folder is located under sources root then dot is threated as packages separator.
It is impossible to choose “Project files”. See screencast.
Hello!
Project and Project Files are scopes in Project tool window. You can find more information about this in the documentation: https://www.jetbrains.com/help/idea/project-tool-window.html#views
In RustRover,
Refactoring cargo packageupdates the package name in theCargo.tomlfile under the[package]section.