Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to detect locked files in specify folder and release them by command line? Something like this (pseudo code):

for file in folder
   unlock file


share|improve this question
Is it alright if third party programs are used? Sysinternals Handle can be used to list and close open handles. Open file/folder handles are what 'locks' files/folders. And yes, it is a command line program. – Bob May 20 '12 at 9:53

Yes, using Unlocker:

enter image description here

Simple use: unlocker file /s

share|improve this answer
Have you tried this? It doesn't seem to do anything. – Robert Ivanc Oct 1 '14 at 13:40
@Robert It has been some while since I last used this utility but at the time I found it effective. Are you running it with administrator permissions? – Mr.Wizard Oct 1 '14 at 15:50
unlocker requires a full path including drive letter, i use it like that: unlocker %cd%\foldername /s – c33s Mar 26 at 0:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .