I am looking for a Windows API that I can call from Delphi 2010 which will allow my application to determine if a specific folder has content-indexing enabled. In other words whether there is a tick in the checkbox named 'Allow files in this folder to have contents indexed in addition to file properties' which is in the Advanced Attributes page of the Property dialog when you right-click the folder. I cannot find much about this on MSDN, but maybe I am not looking in the right places.
+2
A:
function IsFolderIndexed(const folderName: string): boolean;
begin
Result := (GetFileAttributes(folderName) AND $2000) = 0;
end;
Ref: http://msdn.microsoft.com/en-us/library/ee332330(VS.85).aspx
gabr
2010-01-31 18:40:12
You still cannot know if indexing is "on", if it rturns false, you only know that indexing has been disabled.
Ritsaert Hornstra
2010-01-31 19:28:13
Agree, but that's the best info I could find.
gabr
2010-01-31 19:57:40
I can't believe I looked in that table and didn't see it! Thanks.
frogb
2010-02-01 00:01:29