[delphizip] Re: Keeping old versions of a file in a zip archive

  • From: Alistair George <bigal@xxxxxxxxxx>
  • To: Russell Peters <delphizip@xxxxxxxxxxxxx>
  • Date: Thu, 28 Nov 2002 10:55:07 +1300

Hello Russell,
I am programming other sections of my software at present, but next stage was to
trial the 'onsetnewname' and massage the files accordingly.
Please advise:
RP> The OnSetNewName only allows you to rename the new file with the names of
RP> the old files staying unchanged.
Does this mean that say my archive contains myfile.exe, and I am using
addfreshen, that a later instance of myfile.exe will not trigger the
onsetnewname?

If it does trigger, are you saying I cannot rename the later file for inclusion?

The below stuff you mention looks great thanks
Al+
RP> I am working towards being able to do such operations as changing existing
RP> file details (rename,change date & attr) or delete the file,at the same as
RP> new files are added - this condences a number of operations into a single
RP> rebuild.
RP> I might be able to allow the use of a name (or any detail?) modifying
RP> function on a per file basis - this might make renaming files easier though
RP> you would need to know which files first (this is still very much in the
RP> planning stage at present).
RP> Russell Peters
RP> http://www.users.bigpond.com/russellpeters/delphizip.html
RP> ----- Original Message -----
RP> From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx>
RP> To: <delphizip@xxxxxxxxxxxxx>
RP> Sent: Wednesday, November 27, 2002 10:57 PM
RP> Subject: [delphizip] Re: Keeping old versions of a file in a zip archive


>>
>> When I suggest a solution to a problem, I aim to achieve simplicity,
>> backward compatibility, and flexibility. The event handler approach I
>> suggested achieves all these. For instance, provided the event handler has
>> access to a directory list, renaming old versions of MYFILE.TXT to
>> MYFILE.TXT#1, MYFILE.TXT#2, etc is easy. If such an event interface were
>> added to ZipMaster, it would be easy to supply a built-in (but not
>> automatically assigned) event handler to perform this action thereby
>> requiring virtually no work from the user.
>>
>> Relying on file dates is, precarious and would undoubtedly lead to
RP> problems.
>> Renaming the files makes it obvious when reading a directory list (human
>> being), which file is the most recent without having to check dates.
>> However, for programmers that want to rely on dates, an event handler that
>> returns, say '$', could achieve this.
>>
>> Once again, the buzzwords are : simplicity, backward compatibility, and
>> flexibility.
>>
>> Of course, having said all that, Russell's comments regarding the
>> OnSetNewName event suggest that this capability is (almost ??) implemented
>> anyway. I have not used this feature.
>>
>> -- James Turner
>> www.skaro.net
>>
>> PS
>> I agree that the ability to keep old versions of files within an archive
RP> is
>> desirable. I have already included this feature in code I am currently
>> working on for a general purpose archive interface that can work with zip
>> and other archive types.
>>
>>
>>





-- 
Regards,
 Alistair+


Other related posts: