1.

Solve : Force delete a network drive?

Answer»

hi all,

I trying to force delete a MAPPED drive. When I try when i get this error;

Quote

The device is being accessed by an active process. More help is available by typing NET HELPMSG 2404.

is there a way to force delete it as at this point in my batch file (the end) nothing is using it and I want rid.

any ideas??Quote
is there a way to force delete it as at this point in my batch file (the end) nothing is using it

If there were nothing using the mapped drive there would be no reason to force it! The net USE command does not have a force switch. You might consider using VBScript to create a NETWORK object. The network object has a RemoveNetworkDrive method which has a force argument.

Google might ALSO help for a 3RD party solution.

Good luck. cheers,

I have just this minute fixed it.


Earlier in the batch i had mapped T: I have then used this over and over again, I have set the working directory to withing that drive and hadn't come out of it.

The running process was the batch it's self, and a simple 'C:' before 'net use /delete t:' did the trick.

cheers again.

(umm, hidesight is good.......... )


Discussion

No Comment Found