How to create folder structure skeleton using Powershell?

Question:

we are having folder/sub folder structure for our application.

Whenever we are adding new modules, we have to copy the folder structures exactly without copying files.

How to copy the folders and subfolders in the hierarchy but leaving the files alone?

Answer:

This is a bit ‘hacky’ as Powershell doesn’t handle this very well… received wisdom says to use xCopy or Robocopy but if you really need to use Powershell, this seems to work OK:

Source:

How to create folder structure skeleton using Powershell? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply