Im trying to rename a directory to the same name as an existing directory in a test in C++. I have tried SHFileOperation. This actually works mostly. The problem is that we have an auotmated test and for some reason during the automated test the test fails here. Works fine on a manual run but the automated not so much. We think it might be that some dialog box is popping up even though i have the flags set to not allow any. i also tried rename the C++ function. rename doesnt seem to work when trying to rename something to an existing name.
So is there any other method i could use?