Is there any way to know in vbscript or qtp code that the particular object is in use or is free?
Context for this is:
Set fso = CreateObject("Scripting.FileSystemObject")
and then after some coding, I set this as nothing
between this, I unzippped a file and then try to delete the unzipped folder after using it
unzipped folder is not getting deleted and giving permission error
Set fso = Nothing
Can anyone please point me to right direction to troubleshoot this issue?
Re: Permission error while deleting unzipped folder!!
Thanks prince for the reply. Actually, I found the issue. The issue is:
In the code, if you insert breakpoint at a point in the code where the zipped file is unzipped (insert breakpoint here) and we are just going to manipulate and then delete the unzipped folder.
When the script execution reaches the break point, just open the unzipped folder manually. After opening it manually, you will notice that thumbs.db file got created in the unzipped folder. Then, close the unzipped folder.
Then, resume the script from break point. It will give Permission error at the line where code tries to delete the unzipped folder.
If you let the script run without opening the folder manually, then it continues to run fine without any error
This is the weird behavior that I find about this code for unzipping the zipped file, so I thought to post it.