khun
6 years agoNew Contributor
DeleteFolder doesn't work
Hi!
We try this (with TC 12.6) to empty a temporary folder with testdata before running each test:
if aqFileSystem.Exists(Spath):
aqFileSystem.DeleteFolder(Spath, True)
but TestComplete gives an error and the log says:
The directory is not empty.
If the directory _is_ empty, then it is deleted. But the True parameter should delete the folder no matter what. At least that is how I read the documentation...
Thanks for any help!
OK, so someone else in the company just found the problem: if the folder is open in e.g. Windows Explorer, you get this message! All files and folders in the folder are deleted, but the folder itself is not. And TC gives an error about the folder not being empty.