#!/bin/bash listOfFiles=`find ?.dat -type f` date=`date +%d-%m-%Y` for file in $listOfFiles do mkdir $file-$date cp $file $file-$date done