如何删除50个文件名中的最后六个字符

问题描述 投票:0回答:1

我在D:\ dummy \文件夹中有大约50个文件。它的文件名为Abc_566_1.xml.error,Abc_566_2.xml.error..直到Abc&566_50.xml.error

我希望shell脚本/解决方案删除所有50个文件名中的.error。

bash shell file file-rename
1个回答
0
投票
for each in *.error ; do mv $each `sed -e 's/\.error$//'` done
© www.soinside.com 2019 - 2024. All rights reserved.