Will have a look and see what I can come up with (been making a couple of changes to ZipDll) Russell Peters http://www.users.bigpond.com/russellpeters/delphizip.html ----- Original Message ----- From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx> To: <delphizip@xxxxxxxxxxxxx> Sent: Wednesday, December 04, 2002 7:34 AM 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 > > > >