My workspace filesystem folder is currently C:\work\Eclipse-Workspace_PROJ
and my code filesystem folder is C:\work\PROJ
.
I want to rename C:\work\PROJ
to C:\work\PROJ-1
but last time I renamed it . . . bad things happened.
QUESTION
What are the steps to rename my code filesystem folder without corrupting things?
Right-click on the project name & click reload the project. Then rename the project name as highlighted below & save. It will automatically rename the . csproj file.
To rename the project, simply right-click the project and select "Refactor/Rename...". Fill in the new name and click OK.
You can use Move
in the context menu of the Navigator view to move the project to a different folder. This will move the project to a different folder without renaming it.
I sometimes get an error message that the move failed, but the only thing I can see is that the root folder at the old project location is not deleted. After deleting it no further problems occurred (Eclipse Neon.1 / 4.6.1).
Note that the Move
function in CDT's Project Explorer view cannot do this.
Since your projects are not inside the workspace directory, they are not at their default location. So renaming the project won't rename the folder.
You should always rename things like Projects inside Eclipse using 'Refactor > Rename'.
There are many things in Eclipse that need to know about the rename, refactor will deal with updating them all.
If you are asking about renaming the Workspace folder then you do that outside of Eclipse (with Eclipse not running). Provided all the plug-ins you have installed in Eclipse are written correctly Eclipse should not care what the workspace folder is called.
Take a backup first if you are worried things may go wrong.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With