1

Moving and renaming multiple files in a directory

view story
linux-howto

http://www.unix.com – Hi. I am trying to automate the movement and renaming of a number of files in a directory. I am using the 'mv' command as I do not have access to 'rename'. I have the following scripted Code: FILES=$(ls /transfer/move/sys/mail/20130123/)         if [ ! -z "${FILES}" ] ; then                 for i in ${FILES} ; do                         mv /transfer/move/sys/mail/20130123/${FILES} /transfer/archive/sys/mail/20130123/MYFILENAME_`date +%Y%m%d%M%S00`.dat ; d (HowTos)