shell - rename filenames under a folder, make them shorter -
this question has answer here:
- rename multiple files in unix 20 answers
i have folder contains many .ass files subtitles of tv show file name long:
house.of.cards.s01e01.webrip.720p.h.264.aac.2.0-hoc.some-other-things.ass house.of.cards.s01e02.webrip.720p.h.264.aac.2.0-hoc.some-other-things.ass house.of.cards.s01e03.webrip.720p.h.264.aac.2.0-hoc.some-other-things.ass
now want change them shorter form:
house.of.cards.s01e01.ass
house.of.cards.s01e02.ass
house.of.cards.s01e03.ass
is there simple way it? (may via shell script)
thanks in advance
there (not so) simple way it
for f in *; mv "$f" "${f//.h.*/}"; done f in *; mv "$f" "$f.ass"; done
Comments
Post a Comment