Posts: 1,058
Threads: 367
Joined: Oct 2007
I understand than FileExists(sFold 1) does not work if sFol happens to be an ITEMIDLIST, for example "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}".
I would appreciate any suggestion on a workaround to overcome this issue. Many thanks in advance.
Posts: 12,092
Threads: 142
Joined: Dec 2002
Function
ShellObjectExists
;/
function! $path
;Returns 1 if the specified shell object exists, 0 if not.
;path - can be a file system path, ":: ITEMIDLIST" or "::{CLSID}". Cannot be a display name, like "Control Panel".
;REMARKS
;Like <help>FileExists</help>, but supports non-file objects such as virtual folders and Control Panel items.
;Uses <help>PidlFromStr</help>.
ITEMIDLIST* p=PidlFromStr(path)
if(p=0) ret
CoTaskMemFree p
ret 1
Maybe not the best way. Little tested.