I want to change in a project from javascript to typescript. Therefore i want to change the extensions of all files from *.js to *.ts recursively. How do i accomplish it with webstorm?
Asked
Active
Viewed 5,767 times
2 Answers
13
There's no way to rename multiple files in the project in WebStorm, unfortunately. You can vote for the related issue on JetBrains issue tracker.

Ekaterina Prigara
- 4,697
- 3
- 21
- 17
9
Do it outside of Webstorm on linux (or Windows git bash) with ..
cd my-folder
find . -name "*.t1" -exec bash -c 'mv "$1" "${1%.t1}".t2' - '{}' \;
courtesy of Recursively change file extensions in Bash
This works recursively, make sure you cd to the correct folder first (typically your project root folder).
-
3If you want to keep all the `git` history then add `git` before the `mv`, like that `find . -name "*.t1" -exec bash -c 'git mv "$1" "${1%.t1}".t2' - '{}' \; ` – AvielNiego Jun 06 '20 at 15:20