I am trying to copy the files from source to Target folder which has been modified between 2 dates,
#!/usr/bin/ksh
source=/home/Amal/DELTA/SOURCE
target=/home/Amal/DELTA/TARGET
cd $source
find ./ -type f -newermt "2021-07-08 00:00:00" ! -newermt "2021-09-18 23:59:55" -printf "%h:%p:\0" |
while IFS=":" read path file; do
cp "$file" "$target"/"$path"
done
NOTE: Source and directory is having same directory structure already. I just need to copy the files as same as SOURCE directory.
When i execute this script no changes in TARGET folder.