$source = "\\evserver1\C$\Program Files (x86)\Enterprise Vault\Reports\Exchange Mailbox Archiving" $target = "C:\EVArchive_Report" $files = Get-ChildItem -Path $source -Filter *.csv -Recurse $counter ForEach ($file in $files) { $rename = Join-Path -Path $target -ChildPath $file.name $fullpath = $file.fullname if(Test-Path -Path $rename) { $rename = Join-Path $target ($file.BaseName + "_old$counter" + $file.Extension) echo f | xcopy /M /Y "$fullpath" "$rename" $counter+=2 } echo f | xcopy /M /Y "$fullpath" "$rename" } #!!!!!!!! you can need to copy below lines and rename source as many as your amount of ev server $source = "\\evserver2\C$\Program Files (x86)\Enterprise Vault\Reports\Exchange Mailbox Archiving" $files = Get-ChildItem -Path $source -Filter *.csv -Recurse ForEach ($file in $files) { $rename = Join-Path -Path $target -ChildPath $file.name $fullpath = $file.fullname if(Test-Path -Path $rename) { $rename = Join-Path $target ($file.BaseName + "_old$counter" + $file.Extension) echo f | xcopy /M /Y "$fullpath" "$rename" $counter+=2 } echo f | xcopy /M /Y "$fullpath" "$rename" } #!!!!!!!!!! end of copy