How to rename multiple files on my workspace?
![]()
Hi!
I need to rename a lot of files on my workspace.
Can I make it "one shot" like in MS-DOS?
Thnaks.
|
3 answers
![]()
Ivo Jesus (21●1●2)
| answered Jul 23 '15, 8:15 a.m.
edited Jul 24 '15, 6:50 p.m. by Geoffrey Clemm (30.1k●3●30●35)
I try a "different way" and manually create a patch.
It's a little slow but do what I need: it creates the Change Sets with the rename.
Something like that:
### Jazz Patch 1.0
#date: "2015-07-23 11:36:58.000000545 +0100"
#move: "root/dir/file1" "root/dir/file1_v2"
#move: "root/dir/file2" "root/dir/file2_v2"
...
#
Do you foresees any problem, conflict or incompability?
Comments ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If this kind of patch creates the change set that you want, I see no reason not to use this approach.
|
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jul 23 '15, 7:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Eclipse does not have a rename for multiple files. In general it also depends on what files they are and what dependencies they have. If you would just rename Java files, after the rename all java files would be broken, because the imports would be broken. Same for other languages as you probably know.
You want a single file refactor/rename, also to keep the history of the file in SCM. So my conclusion would be no. |
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jul 23 '15, 8:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You are supposed to use the rename functionality if you have just files or Refactor>Rename if it is Java or another file with a semantic known to the editor.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.