$dests=Get-Content -Path e:\dest.csv
$srcs=Get-Content -Path e:\src.csv
foreach($src in $srcs)
{
$x=0
#Write-Host $srcs[$x] $dests[$x]
Copy-Item $srcs[$x] $dests[$x] -Recurse -Force -Verbose
$x=$x+1
}
dest.csv
\\server\d$\abc\
\\server\d$\xyz\
src.csv
\\fileserver\Users\abc\*
\\fileserver\Users\xyz\*
$srcs=Get-Content -Path e:\src.csv
foreach($src in $srcs)
{
$x=0
#Write-Host $srcs[$x] $dests[$x]
Copy-Item $srcs[$x] $dests[$x] -Recurse -Force -Verbose
$x=$x+1
}
dest.csv
\\server\d$\abc\
\\server\d$\xyz\
src.csv
\\fileserver\Users\abc\*
\\fileserver\Users\xyz\*
No comments:
Post a Comment