in reply to win32::filesecurity -- outdated?

I don't see the value in guessing before-hand whether unlink will fail vs. just doing the normal:

unlink( $file ) or die "Can't delete $file: $!\n";
There are a lot of things that can make unlink fail.

Did you actually find that "delete files within the folder" was disabled and enabling it fixed the problem? Because my first guess in that situation would be that you still have the file open and the default sharing mode don't allow deleting of open files. See the Win32API::File documentation for more information on Win32 file sharing modes.

Oh, and sorry, no, I don't know of any great Perl modules for dealing with Win32 security. There is a module called Win32::Perm or Win32::Perms or something that will never be on CPAN and that does way too much meddling with the data for my tastes so I don't know much about it, but you might search for that one and see if it does more of what you are looking for.

                - tye