Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Can't remove directory-Permission denied

by aitap (Curate)
on Oct 22, 2012 at 15:32 UTC ( #1000366=note: print w/replies, xml ) Need Help??

in reply to Can't remove directory-Permission denied

In addition to the (++) previous answer, Windows never lets user delete an open file or directory. If the file you want to delete is open, you'll have to terminate the application which holds it open (or make it close the file somehow else).
Sorry if my advice was wrong.
  • Comment on Re: Can't remove directory-Permission denied

Replies are listed 'Best First'.
Re^2: Can't remove directory-Permission denied (share)
by tye (Sage) on Oct 22, 2012 at 16:30 UTC

    Not completely true. Windows applications are free to open files in a manner that specifies that deleting is allowed. It is just a matter of which FILE_SHARE_* constants are specified. I find it unfortunate that the Unix-like interfaces for opening files on Windows specify that renaming and deleting is not to be allowed. I'd prefer that Unix-like calls result in more-Unix-like behavior.

    Win32API::File documents the FILE_SHARE_* constants and allows one to make use of them from Perl. Sadly, I neglected to mention in those documents that FILE_SHARE_DELETE also allows the file to be renamed while it is still open.

    - tye        

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000366]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2018-03-23 18:19 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (296 votes). Check out past polls.