Re: "." and ".." returned by dir()

new topic     » goto parent     » topic index » view thread      » older message » newer message

don cole wrote:

<snip>

> I always use,
> 
> if compare(d[x][1],".")=0 or compare(d[x][1],"..")=0 then
> --ignore
> end if
> 
> So I don't really care about the order.

Yes, I'm using similar code.
I just had the idea to skip the first 2 elemnts of dir()'s result,
when its argument is a directory that is not the root dir.

When we have ...
object list
list = dir(mydir)
if atom(list) then ... blah, blah ...


... then we could use
for i = 3 to length(list) do


instead of
for i = 1 to length(list) do
   if compare(...


Not soooooo important, I know. :)

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu