Micro Focus QTP (UFT) Forums
how to check the existence of a file in desktop - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: how to check the existence of a file in desktop (/Thread-how-to-check-the-existence-of-a-file-in-desktop)



how to check the existence of a file in desktop - ashuniks - 11-28-2008

hi ankur
how can we check that a particular file is already exist on any folder or Desktop.

Regards
Ashish


RE: how to check the existence of a file in desktop - yaron.assa - 11-29-2008

Code:
Set oFSO = CreateObject("Scripting.FileSystemObject")

Msgbox oFSO.FileExists("C:\Documents and Settings\UserName\Desktop\Somefile.txt")