none
how to find which process locked the log file RRS feed

  • Question

  • Hi,

    I have "app.log" file in D: drive and I can not change it or modify. It seems the file is locked by some process. Is any way to find wich process locked the file?

    I tried to use process monitor, but it can not find this file, just dll's.

    thanks

    Thursday, August 16, 2012 5:15 AM

Answers

  • open process explorer press ctrl+f or go to find menu and click file handle or dll and write the file name which is app.log then click search it shall show you the file which is locking the log file.


    http://www.arabitpro.com

    Friday, August 17, 2012 10:16 AM
  • Use Process Explorer from Sysinternals.

    When open, use the icon that resembles a pair of Binoculars... or use the Hotkey Ctrl+F(find)

    Type the name of the file... it will show you which process is presently running and has locked the file for use.

    EDIT: Apologies Syed, I scrolled down and saw that no one else had answered the direct question on how to search strings until after I had submitted. Voted your answer as helpful.


    Steve Kline
    Microsoft Certified IT Professional: Server Administrator
    Microsoft Certified Technology Specialist: Active Directory, Network Infrastructure, Application Platform, Windows 7
    Microsoft Certified Product Specialist & Network Product Specialist
    Red Hat Certified System Administrator
    Microsoft® Community Contributor Award 2011
    All opinions expressed on my own behalf and not that of my company.
    This posting is "as is" without warranties and confers no rights.

    Friday, August 17, 2012 3:00 PM

All replies

  • Hello, 

    Use process explorer to find it out. For more details refer:http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx


    Regards, Ravikumar P

    Thursday, August 16, 2012 6:11 AM
  • In process monitor, you can add a column named Window Title, in this column you can see the path to the log file.
    Thursday, August 16, 2012 6:14 AM
  • I am sorry I mean process explorer,

    Henrik, are you talking about process explorer from sysinternals?

    thanks

    Thursday, August 16, 2012 7:44 AM
  • you can press CTRL+L in process explorer to see which handles a process has opened (when you select a process). also you can use find to search for a file and see what processes have that file opened
    Thursday, August 16, 2012 7:58 AM
  • I tryied CTRL+L but windows open empty.

    Window Title does not display open files.

    Through the find process explorer seems does not display all open files used by process.

    Do I miss something?

    Friday, August 17, 2012 7:41 AM
  • when you have the empty pane in the lower window, does pressing ctrl+h change anything.

    hmm, if you have uac enabled, either try running process explorer as administrator (account and evelated privileges) or turn uac off for trying out (winkey + r --> msconfig --> tools --> uac)

    Friday, August 17, 2012 8:10 AM
  • open process explorer press ctrl+f or go to find menu and click file handle or dll and write the file name which is app.log then click search it shall show you the file which is locking the log file.


    http://www.arabitpro.com

    Friday, August 17, 2012 10:16 AM
  • Use Process Explorer from Sysinternals.

    When open, use the icon that resembles a pair of Binoculars... or use the Hotkey Ctrl+F(find)

    Type the name of the file... it will show you which process is presently running and has locked the file for use.

    EDIT: Apologies Syed, I scrolled down and saw that no one else had answered the direct question on how to search strings until after I had submitted. Voted your answer as helpful.


    Steve Kline
    Microsoft Certified IT Professional: Server Administrator
    Microsoft Certified Technology Specialist: Active Directory, Network Infrastructure, Application Platform, Windows 7
    Microsoft Certified Product Specialist & Network Product Specialist
    Red Hat Certified System Administrator
    Microsoft® Community Contributor Award 2011
    All opinions expressed on my own behalf and not that of my company.
    This posting is "as is" without warranties and confers no rights.

    Friday, August 17, 2012 3:00 PM
  • Hi

    As everybody said Process Explorer (ex Systernals) is good for this troubleshooting.

    You can download it from Microsoft http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

    Or Yu can use another tool caled Unlocker. Last version I found is 1.9.1. With this tool you can also unlock file from being held.

    You can download it from Mayor Geeks for free http://majorgeeks.com/Unlocker_d4660.html or from offical site here http://www.emptyloop.com/unlocker/#download

    On official site you can find more info about tool.

    Hope this will be helpfull to you


    Best regards
    Dubravko Marak
    MCP
    Blog: Windows Server Administration
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. Please VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

    Friday, August 17, 2012 5:23 PM
  • Hi

    Here is the best solution : http://windowsxp.mvps.org/processlock.htm

    Tuesday, September 24, 2013 1:39 PM