jens,

shell not setting the @error is not true.

Code:
$site = "Fu.bar"
shell '%comspec% /c ping -n 1 ' + $site + ' > nul'
if @error
? "Unable to ping " + $site
else
? $site + " is up"
endif



Also, while using variables inside a string is frowned upon it is valid kix code unless one uses the "NoVarInString" option.

Double check your xxcopy syntax, I think your problem is in there.