[delphizip] Re: Ziping files in use!

  • From: Gerard <gslurink@xxxxxx>
  • To: delphizip@xxxxxxxxxxxxx
  • Date: Mon, 04 Nov 2002 12:02:43 +0200

Hi Paul,

If I am not mistaken ZipMaster generally tries to open a file 
fmShareDenyWrite, which will fail if the file is already opened for write.

If the file in use is not opened exclusively you could try to make a copy 
and zip the copy. This however might require a rename in the zip file so 
that the compresed file has the path/name of the original file.  (Solution 
I have from Barry Morris)

If the file is opened exclusively, it is not so easy, because you cannot 
open the file at all. You have then to copy the file clusters somehow. I 
have never done that. It could be that there are API calls that copy a file 
byte by byte without opening it. Depends also on the filesystem, FAT and 
VFAT tolerate more than NTFS.

Regards,
Gerard.

At 15:59 4.11.2002 +0800, you wrote:

>I have a program that requires files to be zipped when they are still in
>use by other users.  I do not know how to make ZipMaster  do this.  Any
>files in use get skipped.


Other related posts: