General discussion

Locked

Delet log file

By dnoteware ·
How can I delete a log file that has the following error "Cannot delete log. There has been a sharing violation, the source or destination file may be in use" I have closed the application that generates the log file.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Delet log file

by diabetic In reply to Delet log file

You need to do two things.
First, check the file attributes to make sure that it is an archive file.
Then, using task manager, end task every program except explorer. You should then be able to delete the file. If you cannot, it is a core system file and deleting it will kill Windows.

Regards,
diabetic

Collapse -

Delet log file

by dnoteware In reply to Delet log file

I rebooted the server and the log file was unlocked.

Thanks for your help.

Collapse -

Delet log file

by Joseph Moore In reply to Delet log file

I agree with the suggestion of End Tasking all applications that are running that could be using the log file. If you can tell exactly what program is using it (a virus log file, for example, would be held open by your virus software), then stop that program and you won't need to stop any others.
Either way, a trick that sometimes works -- not always, but it is worth a shot -- is to try and rename the log file to something else.
At that point, reboot.
When the system comes up, since the log file is renamed, it won't find it and it will, therefore, will not be locked. You can then rename it back to its original name and do whatever you want to with it.
Now, keep in mind this suggestion will make some program error out. It could cause more trouble than you want to deal with. But, it is an option.

Collapse -

Delet log file

by dnoteware In reply to Delet log file

I rebooted the server and unlocked the file. Thanks for your help.

Collapse -

Delet log file

by dnoteware In reply to Delet log file

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums