How to add filename extension to every file in directory
This shell script will rename every file in a directory recursively and add a .docx
extension to its filename (even if there is already an extension), preventing overwriting existing files of the same name via mv --backup=numbered
:
find . -type f -exec mv -v --backup=numbered "{}" "{}.docx" \;