Saturday, May 16, 2020

Bash script to rename or move files from a directory !

Facebook

Following is the bash script that renames a sets of file form the current directoy. In the following is just updating the extension.


#/bin/bash

for file in *.JPEG; do

        name=$(basename "$file" .JPEG)

        mv "$file" "$name.jpeg"

done



0 comments:

Post a Comment

I love to entertain onymous user Comment !

Pages

 ©mytechtoday.com 2006-2010

 ©Mytechtoday

TOP