I need to copy a file from one location to another while renaming the file with adding date and time stamp YYYYMMDDHHmmSS in this Format only using shell.
My Bash shell code:
cd $1
f1=Sup_Org_File_
for f in *.xml
do
cp -v "$f" $2/"${f1%}"$(date +%F%H:%M).xml
cp -v "$f" $3/"${f1%}"$(date +%F%H:%M).xml
done