Creating a copy of a folder with its saved folder format intact?

I forgot to say, there is already a script which may do what you need here:

Edit: Doesn't use a marker file like I thought. I must be confusing it with something else. But it may still be of interest.