Does Robot have any function that checks the existence of a folder in a specified directory?
Justlike a 'filevp' that checks the existence of a file in a specified directory path.
Just try the following code to check the existance of a folder:
On Error Resume Next
If Err=75 then
MsgBox "Directory already exists."
MsgBox "Directory created."
In above code, existance of Temp folder is checked under C:\.
A highly advanced bug is indistinguishable from a feature.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">tempfile=Dir("c:\golden_lots" ;, 16)
If tempFile = "" then
SQAConsoleWrite("c:\golden_lots directory does not exist"
End If</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
Your code will work in normal conditions. But just consider following case:
If a folder contains a file with name "Test" (it is having no extension) and you are also looking for a folder with name "Test" then as per your code, "Test" folder exists but it is actually a file.
Need your inputs.