I am using Quality Center to execute tests in Windows 8. The VBScript file creates a temporary (timestamped) workspace/folder to clone the git repository and execute the test.
When I try to remove the folder in the end of the test, it doesn't work and gives an error: Invalid field type definition.
This code works fine if I work with a non git repository and a static project. If I delete manually the .git folder, the script is able to remove the remaining of the folders/files.
'''workspace = "C:\tests\20170613224942"
Dim objFSO, objFolder
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CreateFolder(workspace)
'git clone
'Test Execution
Dim objFSO, objFolder
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder(workspace)
I already tried (unsuccessfully) something like that:
objShell.Run "rmdir /S /Q " & workspace
I don't know if its problem with hidden folder so I tried this:
del /s /a *.git
But this only works for files and in this case only the folder is hidden. Not the sub-folders/sub-files.
Can someone help me to resolve this problem? How can I force the folder removal automatically via script? Thank you.