Re: deleting a file, even if it is being used by another person or process

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Charles Law (blank_at_nowhere.com)
Date: 12/23/04


Date: Thu, 23 Dec 2004 09:56:59 -0000

You could have a look at WhoLockMe at

http://www.dr-hoiby.com/WhoLockMe/

to find out the process that has the lock.

HTH

Charles

<shandra@igmax.com> wrote in message
news:1103754856.876536.239580@f14g2000cwb.googlegroups.com...
>I have a file I need to delete or truncate. I tried using the KILL
> command in VB6. I tried using the file.delete command in VB.net. I
> tried manually deleting, renaming, and copying over the file... but
> nothing works.
>
> I keep getting the error: Cannot delete access_log: it is being used by
> another person or program.
>
> I tried shutting down services, I tried killing processes using the
> task manager, I tried rebooting, and still, I get the same error.
>
> Is there a way to delete a file regardless of who is using it? My
> preference is to use VB because eventually I need to automate this task
> to happen daily, but I'm really open do anything that works! Doesn't
> it seem there was an old command years ago in DOS that would do it?
> XDEL or DELTREE or something like that?
>
> Is there a way to pinpoint which process is holding this file hostage?
> Does anyone have any tricky tricks up their sleeves I might try?
>



Relevant Pages

  • Re: Task Manager
    ... >Charles wrote: ... >> be able to create a vb program that can 1st kill ... >> task manager. ... >> I want the kill function of the .exe's from the task ...
    (microsoft.public.vb.winapi)
  • Re: 6:00 Computer Locks up.
    ... How do you check for a memory leak? ... The client runs MS Word and WordPerfect on the same Computer. ... The last time it locked up, I had them run the task manager and after we ... You might have a memory leak and the computer might not lock ...
    (microsoft.public.windowsxp.general)
  • Re: Specify only one application allowed to run
    ... You can lock down Task Manager but I know of no way to lock out the startup ... Dave Patrick ....Please no email replies - reply in newsgroup. ... then opening task manager to launch explorer or iexplore. ...
    (microsoft.public.win2000.general)
  • Re: Task Manager
    ... Charles wrote: ... > certain .exe's from the task manager, ... You won't be able to update files that are currently in use but... ... > itself into the right side and display a little icon if ...
    (microsoft.public.vb.winapi)
  • ctrl+alt+del problem
    ... When I press ctrl+alt+delete, it goes directly to the task manager, ... instead of the usual Windows Security screen the has the choices, shut down, ... lock, change password, etc. ...
    (microsoft.public.windowsxp.help_and_support)