0

I have a lots of file names under a folder '/files' ,the extesnions of these files are appended with timestamp when that file was created,somthing like abc.csv_20170329. I want to change the extension of all these files to abc.csv_20170330 using the rename command in OSX using the terminal.Can any one help me with the exact command to do that i tried using $ rename -S '.csv_' .csv_20170330 '.csv'

but this does not work.

user964819
  • 343
  • 3
  • 6
  • 24
  • 1
    Possible duplicate of [Changing file extensions for all files in a directory OSX](http://stackoverflow.com/questions/14887275/changing-file-extensions-for-all-files-in-a-directory-osx) – VitorMM Mar 30 '17 at 11:32

1 Answers1

0
 for file in abc.csv*
 do
    mv "$file" "$file__20170330"
 done