Bash SH Script - Rename File with specific extension + Move to specific location
问题 SEE VISUAL EXPLANATION and EDIT I'm trying to create a bash script to do a rename+move. This is the example situation: |DOCTEMP - NameOfTheFolder---------|NameOfADocument.docx FOLDER---| |DOCFINAL - OtherNameOfTheFolder---|OtherNameOfADocument.pdf | |etc. What I want to do is a script that: Part I Only if the file has docx, pdf, ppt then rename it as its folder but without DOCTEMP - / DOCFINAL - . NameOfADocument.docx => NameOfTheFolder.docx OtherNameOfADocument.pdf => OtherNameOfTheFolder