Assuming you don’t create folders or shares with embedded spaces, the above approach should work fine. If you are dumb enough, oops, I mean ill-informed enough, to use embedded spaces, you’ll need to insert escaped quotes around the leading and trailing $unc “chunks” above…