Copy directory without using cp-r

Hi guys,

I need a solution to copy files and folders without using cp-r , cp-R or any variants. So i need to code it manually. I allready have a loop

#!bin/bash

IFS=$'\n'

if test "$1" = "" 
then
        wd=pwd
else
        wd=$1 
fi

for file in $(find $1)
do    
        if [ -f $file ]; then
                cp $file ~/Desktop 
        elif [ -d $file ]; then
                 #copy directory,subdirectory and files wihtout
                 #using cp-r, cp-R or any variant
        fi
done

Homework assignments need to be posted in the Homework & Coursework Questions forum using the form described on that page.

If this isn't a homework assignment, why can't you use cp -R ?