5

このようなファイル拡張子を持つファイルが何千もあります

3_bedroom_villas_in_chennai.html__201308050010_
3_bedroom_villas_in_chennai.html__201308080012_
3_bedroom_villas_in_chennai.html__201308100012_
3_bedroom_villas_in_chennai.html__201308110034_ and so on.....

ディレクトリ内。これらすべてを次のように変更したい

3_bedroom_villas_in_chennai__201308050010_.html
3_bedroom_villas_in_chennai__201308080012_.html
3_bedroom_villas_in_chennai__201308100012_.html
3_bedroom_villas_in_chennai__201308110034_.html

次のコマンドを使用してWindowsで実行しようとしたとき

ren *.* *.html

私は次のものを手に入れました

A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found.
A duplicate file name exists, or the file
cannot be found. and so on...

すべてを次のような単一のファイル名に変更しようとすることがわかっているため

3_bedroom_villas_in_chennai.html and so on... 

WindowsまたはLinuxでこれを行う方法はありますか??

4

2 に答える 2

1

renamer の使用:

$ renamer --regex --find '(.*).html(.*)' --replace '$1$2.html' *

Windows、Mac、Linux で動作します。

于 2013-09-25T08:22:07.680 に答える