[delphizip] Re: Fragmented archives : Naming conventions

  • From: "Russell Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Thu, 5 Dec 2002 07:54:47 +1100

How about using the bar ("|" ) to designate digits - would be removed for
final filename.
Russell Peters
http://www.users.bigpond.com/russellpeters/delphizip.html
----- Original Message -----
From: "Roger Aelbrecht" <Roger.Aelbrecht@xxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Thursday, December 05, 2002 5:03 AM
Subject: [delphizip] Re: Fragmented archives : Naming conventions


>
> ----- Original Message -----
> From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx>
> To: <delphizip@xxxxxxxxxxxxx>
> Sent: Tuesday, December 03, 2002 9:34 PM
> Subject: [delphizip] Fragmented archives : Naming conventions
>
>
> > Rather than rigidly defining two or three sequential naming conventions
or
> implementing an event handler, would it not make sense to simply define a
> name template such as MyArc??.zip or Archive.z?? or ZipArc.??? or
> Archive.zip (no numeric component). For each archive fragment, simply
change
> the digits sequentially.
> >
> > This does leave the issue of whether to detect the template prior to
> assembly or require such information to be supplied and it also leaves the
> question of the final filename which may need to be treated as a special
> case.
> >
> > e.g.
> > function WriteSpan(const SourceZip,DestDir,NameTemplate:string const
> FinalName:string = ''):BOOL;
> > function ReadSpan(const DestZip,SourceDir,NameTemplate:string; const
> FinalName:string = ''):BOOL;
> >
> > When reading :-
> >   If the template contains no ? chars (and no digits) then prompting for
a
> change of disk would be required.
> >   If NameTemplate simply contained something like Archive001.zip,
ideally,
> it should be able to calculate the correct template, in this case
> Archive???.zip. Provided that the notional filename does not contain
digits,
> this is easy. If it does contain digits, then the problem is a little more
> interesting. However, I think scanning backwards would work well. By this,
I
> mean look at the extension, if it contains digits then replace them with ?

> chars to create the template. If not then if the final char of the name is
a
> digit, then replace these digits with ? chars.
> >
> > Since program filenames often contain version information in the final 2
> digits of the name, there is a problem. Assembling an archive named
> xxxxxx20.zip fragmented as xxxxxx2001.zip, xxxxxx2002.zip, etc could not
be
> done by automatic detection. Such an archive would have to be fragmented
as
> xxxxxx20.z01, xxxxxx20.z02, etc. in order that it could be correctly
> assembled (without getting into complex strategies). This maybe why WinZip
> uses this naming strategy (according to earlier comments).
> >
> > It's all good fun - not !!!
> >
> > -- James Turner
> > www.skaro.net
> >
> >
>
> I did create sort of a template to find the mulit volume archives
> I start with a file name Archive.zip if that is found we go ahead,
> if not found I search for Archive*.zip and on hard disk keep looking until
> the
> last one is found this is probably the file with the EOC in.
>
> To keep thins simple I use a property flag to know that we the
> filenamescheme of WinZip is used then the search goes for Archive.z*
>
>  I don't discuss the why's on this numberscheme's
> they were already there went I learned to know TZipBuilder and it leave
> it as it is for backward compatibility
>
> Regards,
>
> Roger Aelbrecht
> http://web.wanadoo.be/driehoeksw
>
>
>
>



Other related posts: