We can't change the fossil fuel companies' behavior in isolation from the rest of the industrial system. As long as they have customers, they're going to continue to operate, whether or not we divest of their stock. However, divesting might be helpful in terms of disrupting the story that what these companies do is perfectly okay. This situation differs from apartheid in a key regard though: racial equality in South Africa was no threat whatsoever to capitalism as we know it. Ending the fossil fuel era is a much deeper change.