$target1 = ("D:\1", "D:\2","D:\3")
$target2 = ("C:\1", "C:\2", "C:\3")
$target3 = ($target1,$target2)
foreach($foreachTarget in $target3)
{
$src = $foreachTarget[1]
$xdt = $foreachTarget[0]
ECHO $src $xdt
}
D:\2 D:\1
C:\2 C:\1
D:\1 C:\1
D:\2 С:\2
D:\3 С:\3
$func = { param ($a, $b) ('{0} {1}' -f $a , $b)}
[Linq.Enumerable]::Zip(@("D:\1", "D:\2","D:\3"), @("C:\1", "C:\2", "C:\3"), [Func[Object, Object, Object[]]]$func)
D:\1 C:\1
D:\2 C:\2
D:\3 C:\3