cannot delete : it is being used by another person or program


i am running windows XP
i am trying to delete and move a couple of folders and files.
i get this error message.

Cannot delete [Folder Name]: it is being used by another person or program
close any programs that might be using the file and try again.

The point is no other program is using the files / folders. i have restarted the comp so many times , shutdoen the antivirus but nothing seems to be working. i need to free up hard disk space.

has nayone faced the same problems before ?



Who is Participating?
PaulADavisConnect With a Mentor Commented:
check out cause #2.... also check up on the permissions and ownership of the files and folders.

other possible fixes:
iCe: Tried it in Safe Mode? And which folders you're trying to move (shell folders?)
are these just personal files and folders that you created? sometimes surprisingly something does have the file or folder locked open or sometimes permissions may be a factor... check out this link....;en-us;320081
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

You might want to take a look at the Process Explorer from Sysinternals:

It can show you which handles (file, reg. key, directory etc.) and DLLs are in use and who is using them. Use "Find Handle" to do a search on opened handles. Just enter the directory or file name that is locked in the search bar. You will get the list of the processes that are keeping the file or directory locked.

right click the file you would like to remove then on the popup menu click on cut, now open the bin and paste in there, now empty the bin.

You might try removing it in safe mode.  Might also try opeing task manager and killing as many processes as you can, though the wrong one and you get the countdown to shutdown box.  Then kill explorer, then open cmd.exe from the task manager and try to delete it from the command line.  If that doesn't work, you can try deleting it from the recovery console.
jvuzConnect With a Mentor Commented:

Deletes one or more files.

DEL [drive:][path]filename [/P]
ERASE [drive:][path]filename [/P]

  [drive:][path]filename  Specifies the file(s) to delete.   Specify multiple
                          files by using wildcards.
  /P Prompts for confirmation before deleting each file.


del test.tmp = Deletes the test.tmp in the directory that you currently are in, if the file exists.
del c:\windows\test.tmp = Delete the c:\windows\test.tmp in the windows directory if it exists.
del c:\windows\temp\*.* = (* is for wild character(s)) *.* indicates that you would like to delete all files in the c:\windows\temp directory.
del c:\windows\temp\?est.tmp = (? is a single wild character for one letter) This command would delete any file ending with est.tmp such as pest.tmp or zest.tmp...
If you have access to another computer, you could pop the drive into the other computer and delete the files/folders using the other operating system,
That would work.
is it an extremly long name+path (->try to rename a subordinated folder to 1 character, try to delete the file, rename the folder to its previous name)
have you tried to delete the file in a Dos command-windwo ("Del" like comment from jvuz) ?
icebAuthor Commented:
o my god !
soo many replies.

i'll have tuff time awarding points.
i m busy trying the solutions.

will get back soon.

thanks to everyone.


icebAuthor Commented:
Thanks. PaulADavis
This solution worked.

cmd. did it.
!@#$%^&*()  -> state of my mind  -> whom to award points.

Similar solution by jvuz.
Similra solution by timothyfryer -> had tried in safe mode and also by killing the processes

barcelona_blom had a good suggestion too.
dbacalja sent a cool link.

Huseyin1 -> i had tried that but even cut did not work.
berni1234 -> even renaming was giving the same error.

Still thinking about awarding points.


when i used del command in cmd it deleted the file. now it is not even in the recycle bin.
where did it go ? i know permanently deleted but shudnt it have been in recycle bin.

lol.... i was surprised as well when i saw how many folks jumped on the question.... :-)

thanks iceb....

experts exchange is a really nice place to find the answers you need and learn new things.... love it ;-)

all the best to you ....
icebAuthor Commented:
ok i feel guilty conscious.
please accept these points in the separate question i have created.
[dbacalja] 100
[PaulADavis] 100
[timothyfryer] 50
[jvuz ] 100

sramesh2k -> had tried in safe mode. sorry . no points.
dbacalja -> 100 points -> for the excellent link
PaulADavis -> 100 points  -> cuz of the simple reason he answered first.
Huseyin1 -> i had tried that but even cut did not work.
timothyfryer -> 50 points -> same suggestion. but could have explained like jvuz. No offense meant.
jvuz -> 100 points -> for providing info at one place.
berni1234 -> your answer was a pointer to jvuz. no points. no offense meant.
barcelona_blom -> was a good suggestion. but not the primary solution. soory . no points.

This was by far the toughest time i had awarding points. it has taken me close to 30 minutes to be try to be fair to everyone.
(i hope :-))

I had the same problem and the cut and paste tip worked for me.
I had this same problem with a large video file that refused to delete on my XP Pro NTFS machine.
I cut and pasted the file to an empty partition and formatted the partition and it cleared it ok.

This was before I saw Huseyin1's comment above suggesting a cut and paste to the Recyvle Bin which of course. if that works would be much simpler.

The “accepted solution” to this has worked perfectly for deleting the undeletable files, but there is one small problem with this “accepted answer”.  It is just a bandaid, and only fixes the problem when it arises.  What do I do to keep the problem from arising in the first place?  I am now to the point that I am getting these undeletable files almost every other day, in the My Documents folder.  I use the sysinternals process explorer to check out which process has the lock, and it is consistently explorer.exe.  Why would explorer.exe be keeping these locks in the first place?

I have service pack 2 for Windows XP Professional, and it seems to have gotten worse after I installed service pack 2.  I don’t remember ever having this problem when I had no service packs installed, but then again that could just be my imagination.
kennethburgener, you should open a seperate question....

this question 1.has been closed 2. is someone else's request for assistance.

check your permissions structure and/or perform a repair installation.
I am now unsubscribing from this question and will now longer receive notices.
Bet you would get a ton of responses if you opened a new question.
I have taken your advice and begun a new question here:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.