Bash script - Remove the 3 top level of a full path filename

Hello.

Source file are in : /a/b/c/d/e/f/g/some_file
Destination is : /d/e where sub-directories "f" and "g" may missing or not.

After copying I want /a/b/c/d/e/f/g/file1 in /d/e/f/g/file1
On source /a is top-level directory
On destination /d is top-level directory
I would like something like :

SRC="/a/b/c/d/e"
DEST="/d/e"

   cp_function --parents "$SRC"   "$DEST"

Any help is welcome.

I'm not sure i follow ... but it looks like rsync could do the job for you ?

I have a try.

---------- Post updated at 16:46 ---------- Previous update was at 16:42 ----------

I have done this which works :

for MY_FILE in $( find "$SRC" -type f \( -iname "*$SEARCH1*" ! -iname "*~" \)  ) ; do
                    A_PATH=$( echo $MY_FILE | cut -d'/' -f6- )
                    DEST_PATH="/$A_PATH"
                    DEST_DIR_NEW=${DEST_PATH%/*}
                    mkdir -p "$DEST_DIR_NEW"
                    cp -fv  "$MY_FILE"  "$DEST_PATH"
done

---------- Post updated at 17:03 ---------- Previous update was at 16:46 ----------

rsync does not create missing directories in destination.
So it is not better than cp