Note: the publish-via-msbuild.bat shown here simply builds the site and drops it into a directory, transforming the Web.configs
It does NOT sync the directory in any meaningful way.
To do that, I recommend using a tool like Rsync or MSDeploy
MSDeploy example:
msdeploy.exe -verb:sync -source:dirPath="C:\mysite" -dest:dirPath="C:\this\is\where\i\want\to\deploy" -enableRule:DoNotDeleteRule
The DoNotDeleteRule says "hey, if this file exists in the destination but not in the source, leave it alone"