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


  • 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

  • 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 '16 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.