This should work. It requires the DirPlus() - a recursive dir tool UDF.
I'm sure there is a shorter way. This is a quick and dirty solution.


 Code:
Break on

$upload = "\\server\share\"
$server1 = "\\server1\share\"
$server2 = "\\server2\share\"

;returns a list of files in the upload folder.
$upload = dirplus($upload,"/a-d")

For Each $file in $upload
	;check if the file allready exists on server1.
	If Exist ($server1 + $file.name)
		;make a backup if the file exists then copy the new file.
		Copy $server1 + $file.name $server1 + "backup\" + $file.name
		Copy $file $server1 + $file.name
	Else
		;copy the file.
		Copy $file $server1 + $file.name
	EndIf
	;check if the file allready exists on server2.
	If Exist ($server2 + $file.name)
		;make a backup if the file exists then copy the new file.
		Copy $server2 + $file.name $server2 + "backup\" + $file.name
		Copy $file $server2 + $file.name
	Else
		;copy the file.
		Copy $file $server2 + $file.name
	EndIf
Next


Edited by Mart (2007-06-08 02:14 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.