如何用webstorm 10重命名一批文件

How to rename a batch of files with webstorm 10

我想将项目从 javascript 更改为打字稿。 因此我想递归地将所有文件的扩展名从 *.js 更改为 *.ts。 我如何使用 webstorm 完成它?

不幸的是,在 WebStorm 中无法重命名项目中的多个文件。 您可以在 JetBrains 问题跟踪器上为相关 issue 投票。

在 linux(或 Windows git bash)的 Webstorm 之外使用 ..

cd my-folder

find . -name "*.t1" -exec bash -c 'mv "" "${1%.t1}".t2' - '{}' \;

Recursively change file extensions in Bash

提供

这是递归工作的,请确保您首先 cd 到正确的文件夹(通常是您的项目根文件夹)。