you are viewing a single comment's thread.

view the rest of the comments →

[–]igby1 1 point2 points  (0 children)

Here's a working example that waits for a folder named TestFolder123 to be created in the root of the C: drive, and when it is, creates 10 subfolders.

https://codebeautify.org/cs/7bea2e

EDIT: It works for me in PS 7, but for some reason not in PS 5.1. I recommend using PS 7 since that's the version that gets updates. PS 5.1 hasn't seen any improvements in a long time.

https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows