In order to copy a directory tree to another destination folder without the files, all you need is to use xcopy command. xcopy command has a really useful /t switch, which copies only the tree structure. Here is a sample command;

xcopy C:\Users\metin\Desktop\Template\*.* D:\Template\ /s/t

Please note that I have added /s to recurse into subdirectories also. However, you should be careful while using /t option. Because it doesn’t copy empty folders by default. If you want to copy empty folders also, then you need to add /e to do that:

xcopy C:\Users\metin\Desktop\Template\*.* D:\Template\ /s/t/e

I hope you find this magic trick useful. Happy scripting!