Re: Folder loading problem.



Hi

i am having small doubt,

'If (wfd.dwFileAttributes And vbDirectory) = vbDirectory Then'

This code will check the Archive is set 32 ?

thanks
bala

"J French" wrote:

> On Sat, 28 May 2005 09:21:01 -0700, "=?Utf-8?B?QmFsYQ==?="
> <Bala@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> >Hi J French,
> >
> >Thanks for the message... now i have changed the code like this.. is it Ok?
> >please guide me.
> >
> >If Trim(sFileName) <> "." Then
> > If Trim(sFileName) <> ".." Then
> > If (wfd.dwFileAttributes And vbDirectory) = vbDirectory Then
> > .AddItem sFileName
> > End If
> > End If
> >End if
> >
> >Thanks
> >bala
>
> It looks Ok - but the two Trim()s are redundant
>
> The TrimNull will have got the 'proper' file name
>
> Although it should not happen, there might be some devious way of
> creating a file/directory that is just a '.' with trailing/leading
> spaces.
>
> Incidentally (my fault) the logic should read:
>
> If (wfd.dwFileAttributes And vbDirectory) = vbDirectory Then
> If sFileName <> "." Then
> If sFileName <> ".." Then
> .AddItem sFileName
>
> This is because we are only interested in Directories, so that test
> should exclude other suspects /first/
>
>
>
>
.



Relevant Pages

  • Re: Folder loading problem.
    ... >Hi J French, ... >please guide me. ... If (wfd.dwFileAttributes And vbDirectory) = vbDirectory Then ... should exclude other suspects /first/ ...
    (microsoft.public.vb.general.discussion)
  • Re: Folder loading problem.
    ... "J French" wrote: ... >>please guide me. ... > If (wfd.dwFileAttributes And vbDirectory) = vbDirectory Then ... Prev by Date: ...
    (microsoft.public.vb.general.discussion)