Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot delete a folder named same as a share! 1

Status
Not open for further replies.

jwharks

MIS
Apr 9, 2001
26
GB
I have a folder called USERS which used to be on C: drive. It was also shared as USERS.

I then needed to move the folder from C: to D: because of space restrictions, so I unshared the USERS folder on C: and created a new USERS folder on d: I moved all the data across from c:\USERS to d:\USERS and re-established the share for d:\USERS.

I now have an empty folder c:\USERS which I cannot delete because I get the following message:

Cannot remove folder users. There has been a sharing violation. The source or destination file may be in use.

This is definitely not the case. There have been many reboots since the data was moved but to no avail.

Does anybody out there know a way around this, or have I found a bug in NT?

John :-I
 
Check in server manager and see if that folder is shared out. You will probably find it is shared as something.

Unhide the contents and you may find a network trash folder in which case it is a Mac share that is at fault.
 
Sorry Zelandakh, it is definitely not shared as anything. And we don't have any Macs on our system :-(
 
Have you tried deleting this folder from DOS? Sometimes this will work when GUI won't. Also, make sure you are not displaying the contents of the folder (empty or not) with explorer when you try to delete it. This will create a sharing violation sometimes also. If neither of those work logon with a local account and stop the server service and then try to delete it again.
 
It is a Windows NT bug, i have frecuently the same problem and i need restart the server. Then try again and sucessful... ¿? this is my solution.
 
I've had this a few times too, you may want to try this:

with explorer browse to the folder (users in your case) that you want to delete, right click on it and select the properties page. If there is a security tab take ownership of the directory and all subdirectories, this can clear the sharing violation.

This will only work on an NTFS partition.


Steve R
 
for to be sure you have kill all connections try

net use * /delete

then try to delete

if you still have problems may be something using the directory locally. Try to search the directory or the share name on regedit on in others scripts that runout automatically at startup.

bye

ejoy this help

 
Thanks for the tips guys,

In the end the "net use * /delete" from PO13NTr did the job.



John Harkcom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top