11-23-2011, 03:35 AM
I am not sure of your requirement. You can use VBScript to get this done.
Code:
Set fso = createobject("Scripting.FileSystemObject")
DesktopPath = CreateObject("WScript.Shell").SpecialFolders("Desktop")
'Files count
msgbox fso.GetFolder(DesktopPath).Files.Count
'Folders count
msgbox fso.GetFolder(DesktopPath).SubFolders.Count
'Check if specified file is present
msgbox fso.FileExists(DesktopPath & "\" & "qtp.txt")
'Check if specified folder is present
msgbox fso.FolderExists(DesktopPath & "\" & "DSC_019612")