theitd icon

Bash batch rename - trim

theitd | PRO | 03/03/17 06:14:49 AM UTC | 0 ⭐ | 575 👁️ | Never ⏰ | []
Bash |

150 B

|

None

|

0 👍

/

0 👎

# Bash - batch rename, remove everything after a ' ' space
find . -type f -name "* *" -exec bash -c 'f="$1"; s="${f/_ / }"; mv -- "$f" "${s/ *./.}"' _ '{}' \;

Comments