Page 1 of 1

FindFile and hidden folders...

PostPosted: February 21st, 2010, 4:09 pm
by billy
I have noticed that FindFile will fail, no results, when encountering hidden folders.

Example:

c:\not-hidden\hidden

If the search is looking for any file and starts in c:\not-hidden the hidden folder is ignored (not seen?).
To verify create a path as above and put some jpg's (whatever) in the hidden folder and search. The
result will be no files found.

Is there a fix or work-around for this?

Also, many, many thanks for sharing your excellent components.

Billy

Re: FindFile and hidden folders...

PostPosted: February 21st, 2010, 10:50 pm
by Kambiz
As default, FindFile does not look for hidden and system files.

Did you try this:

Code: Select all
FindFile1.Criteria.Attributes.Hidden := fsIgnore;

Re: FindFile and hidden folders...

PostPosted: February 23rd, 2010, 6:58 pm
by billy
Thanks. Adding before FindFile.Execute does work.
Which leaves me with another question.

I had the same set at the component level, FindFile1.Criteria.Attributes.Hidden := fsIgnore;
So it would seem that this property is not being read/not inclusive?

Is this an oversight or do I need to explicitly set all criteria in code despite what is set at component level?

Thanks again,
Billy


Kambiz wrote:As default, FindFile does not look for hidden and system files.

Did you try this:

Code: Select all
FindFile1.Criteria.Attributes.Hidden := fsIgnore;

Re: FindFile and hidden folders...

PostPosted: February 23rd, 2010, 11:52 pm
by Kambiz
You can sent the properties at design-time or run-time, it's up to you.