in reply to Is this directory a subdirectory of another directory?

Interesting problem.

How about building a directory tree at run time and assigning values for each level of the tree.

You'd then compare $input{'directory'} and $input{'copy_to'} and branch accordingly.

Having provided that interesting bit of theory, I'm not really sure how you'd go about doing it.. :-)