How do I keep my files and folders unlocked in Windows 7?

Posted on

QUESTION :

My IDE is getting a frequent problem of failing to delete temporary or scratch files from the disk it is working on and the reason is the files and folders it is working on are being locked by itself and, probably for no reason, it’s unable to unlock the files and folders by itself.

There’s a tool called “unlocker” and “lock hunter” to unlock the locked files and folders but I don’t want do that every time it happens. Is there anything I could do about this? Perhaps a tool that I could use for free to prevent my specific folders and files and folders inside it from being locked by any process?

By the way, the IDE is frequently creating files on that folder and are frequently modified.

ANSWER :

Windows, and other operating systems, by design, use “handles” to access files and directories. These handles can provide a lock to prevent data corruption and read/write conflicts.

Although these handles can be forcibly closed, it’s possible that doing so may crash your application or cause stability problems with Windows.

You may use an application called Process Explorer to search for these handles to determine exactly which handles belong to which processes. You may either kill the process (you will lose any unsaved data) or forcibly close the handle (this is like the file unlock tools you mentioned, your application/Windows may crash or become unstable), killing the process would be preferred.

I would recommend, if these if these files bother you while working, that you save your work, close or kill your IDE, delete the files and then re-open your work.

Additionally, I’d recommend that you contact either the community help or commercial support for your application. You mention that the application creates files frequently and modifies them frequently, in that case your IDE may be keeping those files around by design, perhaps like a cache or back-up for your unsaved changes or your undo history.

I faced the same dilemma. Here’s the simple way. All folders that start with “MY” as in My Documents etc will have locked files. Move file … or folder … or image to the Public directory/folder and voila: the file is not locked any more.

Leave a Reply

Your email address will not be published.