copy directory structure to a system on the network

I am trying to write a script which has to copy the directory structure from my system to another system on the network. But I dont want the files to be copied.

I think I have to start with copying all subdirectories names in a directory to a system on the network.

Here's the case:

Source -System:

/folder1/folder2/XXXXX
/folder1/folder2/YYYYY
/folder1/folder2/ZZZZZ

(here XXXXX, YYYYY, ZZZZZ are sub directories which have files in them which we dont want to be copied)

Destination - System:

/tmp/folder2/XXXXX
/tmp/folder2/XXXXX
/tmp/folder2/XXXXX

(the directory names have to be the same from the previous system, but no files are to be transferred)

How do I go about to do this??

A cheap way to do it is to use the output of find to create a bunch of mkdir statements.

 find . -type d

The output of this (from the directory you want to start in) will print the directory tree, and no files. Throw a "mkdir " at the beginning of each line and I think you'd be set.

 find . -type d | perl -ne 'print "mkdir " . $_'  > make_tree.sh
bash make_tree.sh #on the new system