Error Deleting Folders

C

Chalres W.

I am curently having a problem with deleting folders from
a Windows 2000 system. When I try to delete a folder I
get "Cannot delete X: There has been a sharing violation.
The source or destination file may be in use." (X is the
name of the folder I tried to delete). If I reboot I can
then delete the folder.

After looking at the problem for a while I figured out
that the error message only happens if I try to delete a
folder after I have checked the properties on a file in
that directory (no changes were made just viewed). I
close the properties box, but still get the same error.
Have tried waiting several hours after closing the
properties box, and still get the error. Reboot the
system and I can delete the folder.

I also found that if I go to task manager, and end the
explorer.exe process, and restart it that I can then
delete the folder. Doing it this way has the side effect
of closing any explorer windows I may have open. I can
duplicate the issue on multipule systems.

To duplicate
1. Create a folder.
2. copy several files into the folder.
3. Open the folder, and right click on a file, and select
properties.
4. Click OK or Cancel to close properties window.
5. Close window showing contents of the folder.
6. Attempt to delete folder.
7. Reboot, or open Task Manager, and go to processes tab.
8. End Task on explorer.exe
9. Go to File - New Task, and run explorer.
10. Attempt to delte folder, and it will delete.

Can anyone explain why this happens, and suggest a fix
besides killing explorer.exe everytime? I updated to
SP3. SP4 is not approved here, but I didn't see anything
about this in the bug fix listings for SP4. I also
searched MS KB, but found nothing about this.

Thank you,
Charles W.
Indus Corporation
 
C

Charles W.

Thank you for your reply. Unfortunaty that did not fix
the issue for me. For right now I downloaded a freeware
utility that can kill tasks from the command prompt. Then
wrote a batch file that kills explorer.exe, and then runs
explorer.exe. Of course this closes and explorer windows
I have open which can be a problem if doing a file copy in
another window.

Any other suggestions would be appriciated.

Charles W.
Indus Corporation
 
E

Eric

I'm not sure why your files are locking. But I do know an
easier method for determining what files are locked and
unlocking them.

Start an MMC console and add the shared folders snap-in.
This snap-in should point to the server that the files are
located on. Once you do this, expand Shared Folders and
click on the Open Files folder. This will list all open
files, and let you close them by right-clicking and
selecting Close Open File.

Hope this helps.
 
R

Robert Madloch

I am curently having a problem with deleting folders from
a Windows 2000 system. When I try to delete a folder I
get "Cannot delete X: There has been a sharing violation.
The source or destination file may be in use." (X is the
name of the folder I tried to delete). If I reboot I can
then delete the folder.

After looking at the problem for a while I figured out
that the error message only happens if I try to delete a
folder after I have checked the properties on a file in
that directory (no changes were made just viewed). I
close the properties box, but still get the same error.
Have tried waiting several hours after closing the
properties box, and still get the error. Reboot the
system and I can delete the folder.

I also found that if I go to task manager, and end the
explorer.exe process, and restart it that I can then
delete the folder. Doing it this way has the side effect
of closing any explorer windows I may have open. I can
duplicate the issue on multipule systems.

To duplicate
1. Create a folder.
2. copy several files into the folder.
3. Open the folder, and right click on a file, and select
properties.
4. Click OK or Cancel to close properties window.
5. Close window showing contents of the folder.
6. Attempt to delete folder.
7. Reboot, or open Task Manager, and go to processes tab.
8. End Task on explorer.exe
9. Go to File - New Task, and run explorer.
10. Attempt to delte folder, and it will delete.

Can anyone explain why this happens, and suggest a fix
besides killing explorer.exe everytime? I updated to
SP3. SP4 is not approved here, but I didn't see anything
about this in the bug fix listings for SP4. I also
searched MS KB, but found nothing about this.

Thank you,
Charles W.
Indus Corporation


Hello Charles,

may be a dumb question: Did you move your cursor to another
drive/folder away from the selected one before you tried to delete it.

For example:

checking properties on c:\xyz
then move to c:\abc (must be highlited)
then rightclick on c:\xyz and delete

Because if you do not move in between th e process that is looking up
the folder is the ropertie-"process" you has started.

Please excuse my bad english.

Robert
 
C

Charles W.

Thank you for the reply. Yes I moved the cursor to
another folder. Also I can delete the file/folder I view
properties on, but not the parent folder of that
file/folder. (Example View properties on C:\test\folder1\
Close properties. I can delete C:\test\folder1\ but I can
not delete C:\test\) Even after deleting the file/folder
the parent folder still gives the error. I found this
happens on all Windows 2000 systems, but not on XP. As
this seems to be a bug in Windows 2000, we will most
likely just upgrade the user to XP earlier than expected.

Charles W.
Indus Corporation
 
T

Toni Fontenele

Charles,

We have this problem since Windows 2000 SP2 in one of our servers. The other
always still Ok! Look my discovers about this problem (I am still posting
this issue in this newsgroup but I will contact Microsoft for an help,
soon).

I upgraded our trouble Windows 2000 Server with SP4 and the problem still
here! The another Windows 2000 Server received SP4 too and there is no
problem deleting folders. It never show the message: Error Deleting File or
Folder. There has been a sharing violation. The source or destination file
may be in use."

I am still looking around a solution and until I find it I will keep using
the amazing WhoLockMe (described below).

Thanks in advance,

Toni Fontenele
Architect, Casaflex Ideas and Projects Ltd.

----- Original Message -----
From: "Toni Fontenele" <[email protected]>
Newsgroups: microsoft.public.win2000.file_system
Sent: Monday, March 24, 2003 11:28 AM
Subject: I am Back... Error Deleting File or Folder. There has been a
sharing violation. The source or destination file may be in use.


I am back again with Windows 2000 Sharing Violation Problem... Let's explain
it again... :)

We have two Windows 2000 Servers with SP3. One of them are presenting a
well-known message, when we try to delete a folder:

"Error Deleting File or Folder. Cannot delete "folder": There has been a
sharing violation. The source or destination file may be in use."

I made a research through Newsgroups around the Internet and I found that
explorer.exe is locking that folder. People outhere tell us to restart
Windows and delete the folder, after logon.

As an workaround to prevent a restart, I found a great free utility called
WhoLockMe (http://www.dr-hoiby.com/WhoLockMe/) for Win2K. WhoLockMe is a
little extension for your Microsoft Explorer. It permeets you to list all
the process locking your selected file. So I started to use it to unlock any
folder handled by explorer.exe, just killing its process.

I want to know if there is any solution for this problem. I think it start
after we apply Win 2K SP3, but the other Win 2K Server did not presenting
this problem. Indeed, I am suspecting of our Microsoft Office 2000
Professional (brazilian portuguese) and of our Norton Antivirus 2001.

I want to know if that problem is the same described in Microsoft's
Knowledge Base Article 323045
(http://support.microsoft.com/default.aspx?scid=kb;en-us;Q323045) or the
older NT4.0 Article 165387
(http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q165387).

I think this problem only will solve with Win 2K SP4. But, before this,
anyone can help me?

Thanks in advance,

Toni Fontenele
Architect, Casaflex Ideas and Projects Ltd.

---------------------------------------------------------------------------

We have an Windows 2000 Server where the Windows Explorer starts to show
incorrect icons in the left-window folder's tree, after some file and folder
manipulation, specially after file and folder deleting in the right side.
So, when we click the Up button on the Windows Explorer's toolbar a message
with an error. We click OK button and continue to browser the hard disk but
every opened folder show the same error message.

The incorrect icon that replace the yellow folder icon is one of the icons
inside shell32.dll: an white page with many blues stripes (simulating text)
and a red "A" in the bottom-right side of this white page. It is a common
Windows icon but it is replacing the yellow folders icons.

I think the problem start with SP2 and the problems did not solve with Win
2K SP3 and SP4.

Another strange behavior is when we delete at least one file or one folder
inside of a parent-folder or when we delete the last file or the last folder
of a parent-folder so when we try to delete the parent folder a message
appears: "Error Deleting File or Folder. There has been a sharing violation.
The source or destination file may be in use".

I made a research through Newsgroups around the Internet and I found that
explorer.exe is locking that folder. People outhere tell us to restart
Windows and delete the folder, after logon. As an workaround to prevent a
restart, I found a great free utility called WhoLockMe
(http://www.dr-hoiby.com/WhoLockMe/) for Win2K. WhoLockMe is a little
extension for your Microsoft Explorer. It allow you to list all the process
locking your selected file. So I started to use it to unlock any folder
handled by explorer.exe, just killing explorer.exe process.

Another way to delete the locked folder is setup Windows Explorer to open
the folder's windows in separate proccess (Windows Explorer > Tools > Folder
Options > View Tab > Advanced Configuration > Start the folder's windows in
.....). So, we close all Windows Explorer windows, open a new one and delete
the locked folder.

In both ways, we did not need to restart the computer.

I want to know if that problem is the same described in Microsoft's
Knowledge Base Article 323045
(http://support.microsoft.com/default.aspx?scid=kb;en-us;Q323045) or the
older NT4.0 Article 165387
(http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q165387).

Thanks in advance,

Toni Fontenele
Architect, Casaflex Ideas and Projects Ltd.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top