[EMAIL PROTECTED] wrote:
> Hi,
>
> I want to determine if a directory is empty and delete it.
> I have tried
> if ( -d $dd && -z $dd)
> but that doesn't seem to work. Does -z work
> only with plain files?
>
> Should I read the directory and if it contains only . and .., determine
> that
> is
Hi,
I want to determine if a directory is empty and delete it.
I have tried
if ( -d $dd && -z $dd)
but that doesn't seem to work. Does -z work
only with plain files?
Should I read the directory and if it contains only . and .., determine that
is empty? It must be an easier way than that. Any