On Sun, Sep 26, 2010 at 6:18 PM, Francois PIETTE
<francois.pie...@skynet.be>wrote:

> When an FTP user uploads a file to FTP to an empty directory, then
>> renames/moves the file to another folder where the samely named file
>> exists
>> and even being served by Apache, it simply works! How does this work? I do
>> not think in Windows you can overwrite an file that is being read. Could
>> somebody let me know please?
>>
>
> Sure you can :-)
> An open file can be renamed without affecting the program(s) having the
> file already opened: any file handle still refer to the opened file. Then
> once renamed, you can write an new file with the old name.
>
> I use this trick to have a exe updating itself while executing.
>
>
This seems cool!

SZ
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to