This script should do it:
$changedFiles = dir | where { $_.Attributes -band
[System.IO.FileAttributes]::Archive }
foreach($file in $changedFiles)
{
$targetName = "z:\MySubDir\" + $file.Name
Copy-Item -path $file.FullName -Destination $targetName
}
"Daniel Erkan" wrote:
> Hi!
>
> I'd like to mirror a folder and its subfolders to another server
> regularly, but in order to save time and bandwidth, it should only copy
> files, that have actually changed.
> I would use robocopy, but unfortunately it pretty much only produces
> garbage under vista O_o
>
> Any ideas?
>
>
> Thanks,
> Daniel
>