Force Scripts and Plugins synchronization programatically

What files are you comparing here? What locations?

It sounds different than this guy: