s o m e t h i n g a b o u t m e

files renaming

How to add some string to all file names in current dictionary?

traut@traut-laptop:~/test$ ls
filename1.txt  filename2.wav  filename3.odt
traut@traut-laptop:~/test$ ls -1 | while read filename; \
> do \
> NAME=${filename%.*}; EXT=${filename#*.}; mv ${NAME}.${EXT} ${NAME}_mark.${EXT}; \
> done
traut@traut-laptop:~/test$ ls
filename1_mark.txt  filename2_mark.wav  filename3_mark.odt
traut@traut-laptop:~/test$