As I already stated, you need to adjust the $cmdstr to reflect the directory that you want to copy from. You might want to take a step back and think about what you try to do. It might even help to write it down on a piece of paper. I'm slowly feeling like going in circles. We are definitely willing to help you if you are willing to learn. Thus, please take a moment and study the code fragments provided to you.
Next question, what do you wan to do with a subdirectory inside a directory that contains a .DAT (or whatever) file does this one need to be copied, too? What if this one has it's own .DAt file? Does it go into a different directory on the target?
_________________________
There are two types of vessels, submarines and targets.