Skip to content

Instantly share code, notes, and snippets.


James Nodws Nodws

View GitHub Profile
Nodws / Add prefix or suffix
Last active Jul 18, 2019
Find-Replace string in file's name
View Add prefix or suffix
#add prefix
rename s/'^'/'MyPrefix'/ *
#add suffix
rename s/'$'/'MySuffix'/ *
n=1; for f in ./*.jpg; do mv "$f" $n.jpg; n=$((n+1)); done