Powershell Join-Path showing 2 dirs in result instead of 1 – accidental script/function output

As T-Me correctly inferred before you posted the CreateDatedFolder source, the problem is that the function inadvertently outputs 2 objects, and Join-Path accepts an array of parent paths to each join with the child path. Specifically, it is the New-Item call that accidentally creates an additional output object, just before your return $datedDir call. New-Item … Read more