Sometimes there are programs which open a text file (e.g. a log file for writing something into it).
Unfortunately they do not release them but hold constantly a lock on these files until the
programs are closed.
Can I somehow detach/unlock the file lock e.g. by a command line command or other tool?
Do these programs stop working if they are de-coupled from their file?
Actually they could continue to write something into these log files.
Or are there any other reasons which let them crash?
Camille
It sounds like you are describing files that are in use which will
prevent modification/deletion as long as the application is running
and using them.
The log for the Windows Task Scheduler (SchedLgU.txt) is a good
example (lots of Windows log files). You can read it, but you can't
modify or delete it until the Task Scheduler service is stopped. You
can open the file, copy/paste the contents to another file. Some log
files can't even be opened for reading while they are in use. This is
by design and not indication of an issue that needs attention.
This is not the same as a file that is read only or not properly
released when a program ends. A user may also be prevented from
tampering with a file through restrictions/permissions or the file may
not allow simultaneous modification from more than one source.
You can download third party tools for stubborn files that will delete
them using methods that are generally already available to you through
the Windows GUI. Looks like magic, but it's not really. It is just
more convenient and usually faster than trying to figure it out
yourself. You have also added another program to your system just to
delete a stubborn file, which you can always uninstall later if you
want, and you introduce the potential for malicious software to be
installed on your system.
If something is crashing, hopefully you will try to fix it.
What is the file(s) you are interested in and what are the messages
you see and we can tell you what is going on and provide the most
appropriate.