---
type: link
tags: [pwsh, folders]
created: 2025-12-26T14:43:06.535+00:00
updated: 2026-04-06T11:08:11.104078+00:00
---# pwsh create folders from array in target dir

**URL:** [https://search.brave.com/search?q=pwsh%20create%20folders%20from%20array%20in%20target%20dir](https://search.brave.com/search?q=pwsh%20create%20folders%20from%20array%20in%20target%20dir)

pwsh create folders from array in target dir "[folder1,folder2,folder3,folder4]" -replace '\[|\]' -split ',' | ForEach-Object { New-Item -ItemType Directory -Path "C:\Target_Directory\$_" }


---
**Keywords:** pwsh, folders
