mspatel
10 years agoContributor
FileExists aand FindFiles failed when No file in Folder TestComplete
aqFileSystem.FindFiles("C:\Temp\" , "*.zip" ) .count failed when there is no file or Folder in the Target Folder. It complains about "Object Doesnt Exist " or something...Shouldnt it Return NU...
- 10 years agoHi.
Here is working piece of code.
Sub testFiles
Dim countFiles
Set countFiles = aqFileSystem.FindFiles("C:\Temp\" , "*.zip" )
If countFiles Is Nothing Then
Log.Message ( "No files found" )
Else
For I = 0 To countFiles.Count - 1
Log.Message( countFiles.Item( I ).Name )
Next
End If
End Sub