Posted By

lafayette on 01/30/13


Tagged

batch rename subdir


Versions (?)

batch rename in subdirectories


 / Published in: Bash
 

rename all files in subdirectories from .cpp to .c

  1. find . -type f -name '*.cpp' | while read filename; do mv -v "${filename}" "`echo "${filename}" | sed -e 's/\.cpp$/\.c/'`"; done

Report this snippet  

You need to login to post a comment.