Home » Questions » Computers [ Ask a new question ]

Rename files based on part of a file

Rename files based on part of a file

How do I rename 2009-08-2009-08-13 to 2009-08-$my_var_till_2009-08-13 for multiple files? The 2009-08-13 portion changes with respect to the date of the file, so I need a way to grab that part of the filename. Could I use basename somehow?

Asked by: Guest | Views: 94
Total answers/comments: 1
Guest [Entry]

"mmv can help:

If you ever have to rename or move multiple files under Linux, then
the mmv shell command will make your life easy. The mmv utility will
also come in handy for copying multiple files, appending content of
one file to other files, as well as for creation of links."