none
Finding 'locked' file RRS feed

  • Question

  • I am running a model in Delphi. When I run the model, I'm getting an error related to an input data file indicating 'sharing violation / The process cannot access the file because another process has locked a portion of the file. I just downloaded Process Explorer and was wondering how I can diagnose the problem - i.e. where is the file being locked, and how can I 'unlock' it?

    Thanks.

    JM4413
    Wednesday, August 17, 2016 10:27 AM

All replies

  • Searching

    One of the common problems Process Explorer solves with ease is the question: what process has this file or directory open, or which processes have a particular DLL loaded? 
    You can perform a handle and DLL search by selecting Find|Find Handle or DLL or by typing Ctrl+F. Searches are case insensitive substring searches of all of the handles opened and DLLs loaded on the system with the text you enter. Thus, to search for the process or processes that have c:\directory\somefile.txt open enter enough text to make the search find only the results you are interested in e.g. "somefile". 
    The search dialog populates with the list of results indexed by process. Select a line in the results to have Process Explorer select the reported process and DLL or handle, and double-click on a line to have it do the same and dismiss the Search dialog.


    Wednesday, August 17, 2016 5:06 PM
  • The problem is that Process Explorer doesn't always find a locked directory/file, while Windows does report that it's in use by a process.

    Monday, July 8, 2019 3:30 AM