Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: unlink fails to delete files with perculiar names

by moritz (Cardinal)
on Nov 22, 2011 at 09:56 UTC ( #939414=note: print w/ replies, xml ) Need Help??


in reply to unlink fails to delete files with perculiar names

Just a speculation: the variable name looks like it could be an automatic backup file from MS Word, and might be locked by the Word process, and thus not (easily) removable.

Can you delete the file simply by pressing DEL in the Windows Explorer?


Comment on Re: unlink fails to delete files with perculiar names
Download Code
Re^2: unlink fails to delete files with perculiar names
by DaveARoberts (Novice) on Nov 22, 2011 at 16:40 UTC

    I think you are right in that the file is an auto backup from word, and probably one that was orphaned some months back. Unfourtunatly the file cannot be seen in an explorer window, or from the dir command in a command window.

      Thinking more on this I think that you have touched on the source of the file (a temporary backup from an MS Office program - I have excel, word and powerpoint examples). If I try to delete a file using unlink with the application still open it complains (Permission denied).

      The code snippet is from a file replication utility. I think what has happened is that an oen file has been replicated, the original destroyed by the creating application, and then replaced by a subsequent replication event.

      The preventative cure is to prohibit the copy of a file with the pattern "/~$" in its path/name. The curative solution may be to delete any directory containing files with this pattern - and recreate what I want from a backup

      Unfourtunatly the file cannot be seen in an explorer window, or from the dir command in a command window.

      hidden files require doing more than the default to see them

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939414]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2014-12-18 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (61 votes), past polls