PDA

View Full Version : How to manually unlock a (text) file from a program?


Camille Petersen
September 29th 09, 02:20 PM
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

BillW50
September 29th 09, 02:35 PM
In ,
Camille Petersen typed on 29 Sep 2009 13:20:29 GMT:
> 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?

Actually yes, Camille.

Unlocker
http://ccollomb.free.fr/unlocker/

> 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?

It depends on the program. But Unlocker can copy the file and you can
view that one without decoupling the original.

--
Bill
Windows XP SP2 (5.1.2600)
Asus EEE PC 702G8 ~ 2GB RAM ~ 16GB-SDHC

Bob I
September 29th 09, 02:42 PM
Inline.


Camille Petersen wrote:

> 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.

That is becauee the program will be writing to it.

>
> Can I somehow detach/unlock the file lock e.g. by a command line command or other tool?

Why would you want to close a file that a program is writing to?

>
> Do these programs stop working if they are de-coupled from their file?

Yes.

>
> Actually they could continue to write something into these log files.

Not if you crash the program.

> Or are there any other reasons which let them crash?

Programs crash for various reasons.

>
> Camille
>

Why not just copy the file of interest?

BillW50
September 29th 09, 04:48 PM
In ,
Bob I typed on Tue, 29 Sep 2009 08:42:33 -0500:
> Inline.
>
> Camille Petersen wrote:
>
>> 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.
>
> That is becauee the program will be writing to it.
>
>> Can I somehow detach/unlock the file lock e.g. by a command line
>> command or other tool?
>
> Why would you want to close a file that a program is writing to?
>
>> Do these programs stop working if they are de-coupled from their
>> file?
>
> Yes.
>
>> Actually they could continue to write something into these log files.
>
> Not if you crash the program.
>
>> Or are there any other reasons which let them crash?
>
> Programs crash for various reasons.
>
>> Camille
>
> Why not just copy the file of interest?

Because Windows will not allow users to copy locked files normally. For
example, watch a youtube video with your browser and file exists in your
temp folder. But you can't copy it or anything. Close the browser
(either IE or Firefox works) and the file vanishes. So how do you save
it?

Unlocker
http://ccollomb.free.fr/unlocker/

--
Bill
Windows XP SP2 (5.1.2600)
Asus EEE PC 702G8 ~ 2GB RAM ~ 16GB-SDHC

Google