$from = \"\\\\something\\1 XLS\\2010_04_22\\*\" $to = \"c:\\out\\1 XLS\\2010_04_22\\\" copy-item $from $to -Recurse
This works if c:\\out\\
c:\\out\\
In PowerShell 3 and above I use the Copy-Item with New-Item.
copy-item -Path $file -Destination (new-item -type directory -force ("C:\Folder\sub\sub\" + $newSub)) -force -ea 0
I haven't tried it in ver 2.