Handy scripts that make life easier
Create directory structure based on an existing directory
There is sometimes a need to exactly replicate an existing folder (only with directory structure and not its files) structure.
Usually we end up creating a new folder (target-directory), and then, create a new sub-directory (in the same name as the source directory) by copy-paste method.
This approach works if the number of sub-directories are a few. If they number of sub-directories are more, then a tool can come in handy.
The following powershell script can be used to create (duplicate) a directory structure without creating internal files (or sub-sub-directories)
Get-ChildItem -Directory "your\source\directory\path\here\" | ForEach-Object {
$target = "your\destination\directory\path\here\" + $_.Name
New-Item -ItemType Directory -Path $target -Force
}