David Michael Gang
David Michael Gang

Reputation: 7299

How to rename a batch of files with webstorm 10

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?

Upvotes: 12

Views: 7379

Answers (3)

Gal Margalit
Gal Margalit

Reputation: 5844

There is this awesome plugin for webstorm and jetbrains IDES:
https://plugins.jetbrains.com/plugin/17063-regex-rename-files enter image description here

Upvotes: 2

danday74
danday74

Reputation: 57185

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).

Upvotes: 10

Ekaterina Prigara
Ekaterina Prigara

Reputation: 4957

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.

Upvotes: 13

Related Questions