

Here, we are using For Loop expression to search for all HTML files inside the directory $HOME/Downloads/backup and then executing an mv command to rename the HTML files extension to PDF file extension. $ nano file_renamer.shįor f in $HOME/Downloads/backup/*.html do

To rename files using the bash script, first, you need to create a script file.
