Hi, I'm having trouble with File::Path::rmtree() on Win32 (using ActivePerl 5.8.0, which has File::Path 1.05), as the following test shows: --------------------------------------------- use File::Path 1.05; mkdir('foo', 0666) or die "Can't create foo\\: $!"; open my($fh), '> foo\bar.txt' or die "Can't make foo\\bar.txt: $!"; chmod(0444, 'foo\bar.txt') or die "Can't make foo\\bar.txt read-only: $!"; chmod(0444, 'foo') or die "Can't make foo\\ read-only: $!"; rmtree('foo', 1, 0); print "Exists? ", -e 'foo'; --------------------------------------------- chmod 0666, foo/bar.txt (from 444) at C:/Perl/lib/File/Path.pm line 243. mode = 100666 at C:/Perl/lib/File/Path.pm line 248. unlink foo/bar.txt Can't unlink file foo/bar.txt: Permission denied at file-path.pl line 8 rmdir foo Can't remove directory foo: Directory not empty at file-path.pl line 8 Exists? 1 --------------------------------------------- The first two output lines are from extra warn() statements I put in the File::Path module, to show the file's initial permission (444) and the permission after chmod(0666) (which is mysteriously 100666). Both warnings employed sprintf("%o") to format the result of (lstat $root)[2]. So the chmod(0666) thinks it's successful, but it produces a wacky result, and the unlink() fails afterwards. I'm not enough of a Win32 programmer to know what's going on here. -KenThread Next