linux - Ubuntu - bulk file rename -
i have folder containing sequence of files names bear form filename-white.png. e.g.
images arrow-down-white.png arrow-down-right-white.png ... bullets-white.png ... ... video-white.png i want strip out -white bit names filename.png. have played around, dry run -n, linux rename command. however, knowledge of regexes rather limited have been unable find right way this. obliged might able out this.
if in directory above images, command is
rename "s/-white.png/.png/" images/*
if current directory images, run rename "s/-white.png/.png/" ./* instead. dry run, attach -n said:
rename -n "s/-white.png/.png/" images/*
or
rename -n "s/-white.png/.png/" ./*
Comments
Post a Comment