good chemistry is complicated,
and a little bit messy -LW
Unlink not deleting, Threading issue?by pimperator (Acolyte)
|on Jun 05, 2014 at 02:09 UTC
pimperator has asked for the wisdom of the Perl Monks concerning the following question:
O'Monks with your infinite wisdom, I prostrate myself at your feet. I am nothing, I am nothing without you.I am writing a script to run on a windows device. The special binary files I'm converting to a txt file are in a server, the user has super-user privileges. My problem is that the txt files, which are also saved in the server, are not deleted after using unlink() The purpose of the script:
After doing some reading I see that unlink() will not work if the file is open or if the user doesn't have superuser privileges, which is not the case for both.
Could threading the script interfere with the unlink() command?I is baffled.
Very important: I would like to delete the file in a single pass. That is create, read, delete. I suppose I could wait until the parsing and then delete them all by storing the directories in an array. But each txt file is ~250Mb and there are over 25,000 files that need to be converted. So I don't think the server can take all that data.