FindFile and hidden folders...

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

FindFile and hidden folders...

Postby billy » February 21st, 2010, 4:09 pm

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
billy
Member
Member
 
Posts: 2
Joined: February 21st, 2010, 3:57 pm

Re: FindFile and hidden folders...

Postby Kambiz » February 21st, 2010, 10:50 pm

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

Did you try this:

Code: Select all
FindFile1.Criteria.Attributes.Hidden := fsIgnore;
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: FindFile and hidden folders...

Postby billy » February 23rd, 2010, 6:58 pm

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;
billy
Member
Member
 
Posts: 2
Joined: February 21st, 2010, 3:57 pm

Re: FindFile and hidden folders...

Postby Kambiz » February 23rd, 2010, 11:52 pm

You can sent the properties at design-time or run-time, it's up to you.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron