Thanks,

I found out, that I do need to add the full path
to the file $directoryempty = $searchdrive1 . $directoryempty;

regards,

John

-----Original Message-----
From: HAWKINS,JOSHUA (HP-FtCollins,ex1) [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 11:31 AM
To: 'John Deretich'
Subject: RE: removing an empty directory


I think you need to include the drive on the directory.

$directoryempty = $searchdrive1 . $directoryempty;
rmdir( $directoryempty );

>-----Original Message-----
>From: John Deretich [mailto:[EMAIL PROTECTED]
>Sent: Friday, September 26, 2003 11:56 AM
>To: Perl-Win32-Admin-Request (E-mail)
>Subject: removing an empty directory
>
>
>Hello,
>
>I was wondering if anyone would know
>why rmdir wouldn't remove an empty directory?
>
>This is the code that I'm using:
>
>use strict;
>
>my $directoryempty = undef;
>my $searchdrive1 = 'I:\\';
>
>opendir(EMPTYDIR, $searchdrive1) ;
>       while($directoryempty  = readdir(EMPTYDIR) ) {
>           chomp $directoryempty;
>           rmdir ("$directoryempty") || warn "Cannot remove directory
>$directoryempty\n";
>         }
>
>thanks,
>
>John
>_______________________________________________
>Perl-Win32-Admin mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to