How to get XP to release a locked file

  • Thread starter Thread starter Davis S Rorg
  • Start date Start date
D

Davis S Rorg

From time to time I find XP thinks an application which I have
closed is still using a particular file or folder.

That means I can not delete or rename that file or folder.

Usually I have to wait until the next reboot to delete or rename
that file

---

QUESTION: Are there some utilities or some procedures which
will allow me to track back exactly which program XP thinks is
still using that file?

Then I would like to be able to force that application (or whatever
it is) to release the file.
 
Davis said:
From time to time I find XP thinks an application which I have
closed is still using a particular file or folder.

Sounds like the application in question is a bit dodgy.

Here's what I generally do:
* press Ctl-Alt-Del to bring up the Windows Task Manager
* Click the Applications tab to view current applications
* Highlight the application that is causing the problem
* Click End Task

Alternatively, there may be a problem with one of the processes, which
needs killing. Click the Processes tab to see if you can determine the
likely culprit. Higlight it, then click End Process.
 
sabato 07/ago/2004 _Mark Carter_ in said:
Sounds like the application in question is a bit dodgy.

Here's what I generally do:
* press Ctl-Alt-Del to bring up the Windows Task Manager
* Click the Applications tab to view current applications
* Highlight the application that is causing the problem
* Click End Task

ISTM that the OP doesn't know which application keeps in use the
file/folder.

In those situations I use GiPo@MoveOnBoot, last freeware version 1.9.5 (644
KB) downloadable from

http://www.gibinsoft.net/gipoutils/bin/moveonb.exe

It allows you to "sign" a file/folder for deletion at next reboot.
I used it often and it works.
 
Mark Carter said:
Sounds like the application in question is a bit dodgy.

Here's what I generally do:
* press Ctl-Alt-Del to bring up the Windows Task Manager
* Click the Applications tab to view current applications
* Highlight the application that is causing the problem
* Click End Task

The trouble is that the most likely application has been closed and
is not in the task manager.
Alternatively, there may be a problem with one of the
processes, which needs killing. Click the Processes tab to see
if you can determine the likely culprit. Higlight it, then
click End Process.


The problem is that I can't always identify the most likely culprit
and so I have no idea which process to kill. I use Taskinfo
http://www.iarsn.com/taskinfo.html which seems very clever but I
can't see how to start with the file or folder and see what
process is locking it.
 
From time to time I find XP thinks an application which I
have closed is still using a particular file or folder.

That means I can not delete or rename that file or folder.

Usually I have to wait until the next reboot to delete or
rename that file

I had this problem from time to time with XP, too (even with
just ordinary folders). My solution is usually to quickly log
off and log on again, most of the time this solve the problem
and without the long reboot.




--
RL
Unofficial Adaware Updater (+other goodies)
http://home.earthlink.net/~ringomei/page2.html
********************************
Pricelessware:
http://www.pricelessware.org,
http://www.pricelesswarehome.org,
 
I had this problem from time to time with XP, too (even with
just ordinary folders). My solution is usually to quickly log
off and log on again, most of the time this solve the problem
and without the long reboot.

This is exactly what I do too. Unfortunately it happens more often
than from time to time here. A simple example where this file
locking is bothersome :

1. Open the windows explorer
2. Go to a directory, eg 'dir1'
3. Select a file of 'dr1', eg 'file1'
4. CTRL+X
5. Go to another directory, eg 'dir2' (not under 'dir1')
6. CTRL+V
7. Try to delete 'dir1'
here 'dir1' won't be deleted.
 
Davis said:
From time to time I find XP thinks an application which I have
closed is still using a particular file or folder.

That means I can not delete or rename that file or folder.

Usually I have to wait until the next reboot to delete or rename
that file

There are some interesting points made about this here:

http://forum.osnn.net/archive/index.php/t-3593.html

(I especially like the idea of browsing to the offending file with
notepad and deleting it within notepad...)
QUESTION: Are there some utilities or some procedures which
will allow me to track back exactly which program XP thinks is
still using that file?

Then I would like to be able to force that application (or whatever
it is) to release the file.

An app like this really ought to exist; I can't find one though :-(
 
Antoine said:
:




This is exactly what I do too. Unfortunately it happens more often
than from time to time here. A simple example where this file
locking is bothersome :

1. Open the windows explorer
2. Go to a directory, eg 'dir1'
3. Select a file of 'dr1', eg 'file1'
4. CTRL+X
5. Go to another directory, eg 'dir2' (not under 'dir1')
6. CTRL+V
7. Try to delete 'dir1'
here 'dir1' won't be deleted.

Worked just fine here...
 
jo said:
There are some interesting points made about this here:

http://forum.osnn.net/archive/index.php/t-3593.html

(I especially like the idea of browsing to the offending file with
notepad and deleting it within notepad...)




An app like this really ought to exist; I can't find one though :-(

But such an app *does* exist. :)

It's called Process Explorer, from SysInternals:
http://www.sysinternals.com/ntw2k/freeware/procexp.shtml

"Ever wondered which program has a particular file or directory open?
Now you can find out. Process Explorer shows you information about which
handles and DLLs processes have opened or loaded."

Download for 9x/ME:
http://www.sysinternals.com/files/procexp9x.zip

Download for WinNT/2K/XP: http://www.sysinternals.com/files/procexp9x.zip

Besides showing this information, this amazing app does a lot, lot more.
Highly recommended for advanced users.
 
Davis said:
From time to time I find XP thinks an application which I have
closed is still using a particular file or folder.

That means I can not delete or rename that file or folder.

Usually I have to wait until the next reboot to delete or rename
that file

MoveOnBoot might be your best bet

http://www.softwarepatch.com/software/moveonboot.html

Description
MoveOnBoot allows you to Move, Copy or Delete files before Windows can
lock or alter the files. The changes are made to your hard drive
before Windows starts (it requires a restart of your system after you
give MoveOnBoot its instructions). There are no messy boot or DOS
commands, just a simple 3-step process. For more information about how
this tool can help you, see the Can't delete files tutorial.
 
Antoine said:
You are lucky. Just to be sure, have you well performed a cut/paste
operation and not a move operation ?

A cut/paste operation *IS* a move operation. Or did you mean something else?
 
Mario Alvares said:
A cut/paste operation *IS* a move operation. Or did you mean
something else?

Yes, I meant something else : a cut/paste is equivalent to a move
operation _in its result_. By "move" I meant drag/drop : for
example, - if I cut/paste the file, the initial directory is locked
- if I drag/drop the file, the initial directory is not locked
 
Mario said:
But such an app *does* exist. :)

It's called Process Explorer, from SysInternals:
http://www.sysinternals.com/ntw2k/freeware/procexp.shtml

"Ever wondered which program has a particular file or directory open?
Now you can find out. Process Explorer shows you information about which
handles and DLLs processes have opened or loaded."

I had a look at this earlier. Yes, it will show which files are kept
open by which app, but does it show 'orphaned' files which are still
locked after the app has been closed?
I can't see a way of doing this.
 
Antoine said:
Yes, I meant something else : a cut/paste is equivalent to a move
operation _in its result_. By "move" I meant drag/drop : for
example, - if I cut/paste the file, the initial directory is locked
- if I drag/drop the file, the initial directory is not locked

No, I did not drag and drop. Followed your step-by-step instructions,
and used Ctrl + X / Ctrl + V ;)

What OS are you running. No problems at all on WinXP here. Also, can you
replicate this behaviour everytime, or does it happen randomly?
 
jo said:
Mario Alvares wrote:




I had a look at this earlier. Yes, it will show which files are kept
open by which app, but does it show 'orphaned' files which are still
locked after the app has been closed?
I can't see a way of doing this.

There is no such thing as an 'orphaned' file. Any locked file "handles"
(think of a 'handle' as the OS's way of keeping track of an open file)
are released by the OS, when the process that opened the file terminates.

The files you are referring to are probably the ones locked by Windows
Explorer, because it runs all the time. You can delete files locked by
Explorer as follows :

1) Kill explorer.exe using Task Manager.
2) Launch a Command Prompt, and delete the locked file using the 'del'
command.
3) Restart explorer.exe (Win + R -> Type explorer.exe).
 
MLC said:

Oops... Thanks for the correction, Maria.

However, just to clarify, from their website:

"In order to help us track its use, please download through the link
that represents the operating system on which you will use or mostly use
Process Explorer.

Note that the zip files are identical, and Process Explorer runs on all
Windows platforms."
 
sabato 07/ago/2004 _Mario Alvares_ in said:
Oops... Thanks for the correction, Maria.

However, just to clarify, from their website:

"In order to help us track its use, please download through the link
that represents the operating system on which you will use or mostly use
Process Explorer.

Note that the zip files are identical, and Process Explorer runs on all
Windows platforms."

Thanks to you, Mario, I didn't read that :-\
 
Back
Top