Zip program with specific features

mubs

Storage? I am Storage!
Joined
Nov 22, 2002
Messages
4,908
Location
Somewhere in time.
Anybody know of a Zip program that'll do this:

Replicate a given tree structure and each file in it to a new destination, compressing during replication. In other words, I don't want a 6-level tree structure with 35 directories and 2000 files total being compressed down to one archive file.

Maybe Winzip? (I've never used it).

Thanks.
 

CityK

Storage Freak Apprentice
Joined
Sep 2, 2002
Messages
1,719
Err, on re-reading your question, I'm not certain what you want. Do you want the directory structure preserved in the zip archive file, or do you mean you want to compress a whole bunch of files on your disk? If your just looking to compress the files, use windows built in file compression.
 

mubs

Storage? I am Storage!
Joined
Nov 22, 2002
Messages
4,908
Location
Somewhere in time.
Thanks for the replies.

CityK, I don't want to end up with a single archive file. That means I don't want the directory structure (and all of the files) inside the archive.

Blake has understood what I'm trying to do. Ideally, the original filename is left intact, and the archive type (zip, RAR, whatever) extension is appended at the end. If this is not possible, the program should at least keep the primary file name intact, and only change the type to the archive type.

I can't use Windows compression because the compressed files will be copied to other media that could be an external hard-drive, CD-R, CD-RW, DVD, whatever. The system that will read the compressed stuff may be W98.
 

sechs

Storage? I am Storage!
Joined
Feb 1, 2003
Messages
4,709
Location
Left Coast
It seems to me that PKZIP had a command line option to do this -- about a decade ago. You might want to check the PKware website out....
 

mubs

Storage? I am Storage!
Joined
Nov 22, 2002
Messages
4,908
Location
Somewhere in time.
I tried replying here twice yesterday, trying to use additional emoticons, and it crapped out on me both times. I'll stick to just the standard emoticons now.

I sent an email to support@ some outfits that make compresison programs.

Pkware said sorry, no can do. :evil:

Winzip said they had a command line utility, figure it out yourself. :roll:

RAR Labs said it couldn't be done directly, but using a batch file and RAR, the command line version of Winrar, would do it (they tried and tested it before getting back to me). :D Considering that they gave me a working solution and they are the underdog (who I try to favor), I'll probably shell out the $29 fee and go with this solution after I try it a couple more times.

In case anybody's interested in the batch file (quite ingenious, btw; my DOS batch file days are so long gone I couldn't have done this)
Code:
xcopy /i /h /e %1 %2
for /r %2 %%f in (*) do "C:\program files\winrar\rar" m -x*.rar –ep "%%f.rar" "%%f"

Where %1 is the source directory
  and %2 is the destination directory
One big problem is speed; it seems very slow.

One reason could be my system: BX chipset, P-III/900MHz @112 MHz bus speed, 1GB of RAM, source is on one 7200 RPM IDE drive and destination on another 7200 RPM IDE drive, and both are masters (and only drives) on independent channels.

The other reason could be the extra work being done. Instead of ReadOriginal-Compress-WriteRar, the procedure is now ReadOriginal-WriteCopy-ReadCopy-Compress-WriteRAR-DeleteCopy. :(

Maybe they'll incorporate my requirement in WinRar someday and it'll be more efficient.

Thanks to everybody.
 

mubs

Storage? I am Storage!
Joined
Nov 22, 2002
Messages
4,908
Location
Somewhere in time.
Merc said:
I think winrar is just slow period.
It seems to choke a lot on .pdf files. Dunno why. And .exe files too. So you think it'll still be slow if I build an Opteron 248 system with 15k.3 drives?
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
22,039
Location
I am omnipresent
UnRARing a 600MB file full of JPGs on the fastest PC in my house - presently an XP2800 - takes several hours. At least it does with WinAce.
 

LunarMist

I can't believe I'm a Fixture
Joined
Feb 1, 2003
Messages
17,264
Location
USA
Mercutio said:
UnRARing a 600MB file full of JPGs on the fastest PC in my house - presently an XP2800 - takes several hours. At least it does with WinAce.

Merc,

There must be something wrong with your configuration! In a quick and dirty test to simulate your scenario 11,224 .jpg files were compressed with WinRAR 3 (default compression settings) into a 664,785KB RAR format .exe archive. About 9 minutes were needed to create the archive. After a clean boot, decompression of the archive from one 7200 rpm drive to another required 61 seconds.

I find little advantage in compressing .jpg files because they are already well compressed. I do know that some people like to RAR or ZIP many individual files into a single file for the sake of organization. Obviously that is not mubs' intention here. :eek:
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
22,039
Location
I am omnipresent
Hm. It's reproducable across several of my PCs. I'd send you the file but 1. The asstards at Verizon keep screwing around with my bandwidth (presently a whopping 110kbps according to DSLreports, down from just over 1Mbit a month ago... on the flip side I've also gotten 1.2Mbit results as well) and 2. I don't think you want that many pictures of Veronika Zemanova.
 

LunarMist

I can't believe I'm a Fixture
Joined
Feb 1, 2003
Messages
17,264
Location
USA
Mercutio said:
Hm. It's reproducable across several of my PCs. I'd send you the file but 1. The asstards at Verizon keep screwing around with my bandwidth (presently a whopping 110kbps according to DSLreports, down from just over 1Mbit a month ago... on the flip side I've also gotten 1.2Mbit results as well) and 2. I don't think you want that many pictures of Veronika Zemanova.

I am on the dialup and could not download anything like that. :roll: Did you create the RAR or download it? How many files are in there? Try another archive file or something. Should I try that code above for comparison?
 

sechs

Storage? I am Storage!
Joined
Feb 1, 2003
Messages
4,709
Location
Left Coast
In my past experience with WinACE it was slow working with RAR files. (It is, after all, WinACE, not WinRAR....)

Have you tried actually using WinRAR, to see if there is a difference?
 

timwhit

Hairy Aussie
Joined
Jan 23, 2002
Messages
5,278
Location
Chicago, IL
Didn't we have this argument a little while back. Everyone else says that WinRar is almost as fast as Winzip. Mercutio says that Winrar is 10 times slower.

I don't think I would use Winace to compress/decompress RAR archives, I think it probably works best with ACE archives. Try doing the tests again Merc, using the right application.
 

Howell

Storage? I am Storage!
Joined
Feb 24, 2003
Messages
4,740
Location
Chattanooga, TN
mubs said:
Merc said:
I think winrar is just slow period.
It seems to choke a lot on .pdf files. Dunno why. And .exe files too. So you think it'll still be slow if I build an Opteron 248 system with 15k.3 drives?

Program files in general are already compressed files. There is also an amount of compression built into pdf files as well.

The code you showed earlier will work with any command-line zip program under NT and above provided the zip switches are available.
 

mubs

Storage? I am Storage!
Joined
Nov 22, 2002
Messages
4,908
Location
Somewhere in time.
Whew! A lot of posts all of a sudden.

I didn't time my compresssion, so I can't be definitive. Going by gutfeel, it seems slow. But that could be because of the reasons I've already mentioned. Compression resluts (damn Merc and his Veronica) seem to vary; my Netscape email went from ~318MB to ~62MB :D ; this was the best result. Other results were mixed.

Gut feel I'd say something is wrong at Merc's end. There's no way it should take that long, especially with the proc he's got. Since he can reproduce it across many PCs, maybe his copy of WinRAR/UnRAR is bad.

Lunar, my batch-file script was for a specific purpose, and you will get slow results if you use it. If you read the thread from the beginning, you'll know what I'm trying to do.

Timwhit, you're quite right. I remember that thread too. IIRC, the thread was left dangling without a definite conclusion. We seem to be going down the same path again.

Howell, you're quite right. My purpose in emailing the sw mfrs. was to not spend time installing, playing and uninstalling each. SF is the one luxury I'm allowing myself (time wise) these days.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
22,039
Location
I am omnipresent
I use the tried and true "people who use .RAR for anything are ugly and their files deserve to be ignored" method. So far I've found it works very well.
 

Howell

Storage? I am Storage!
Joined
Feb 24, 2003
Messages
4,740
Location
Chattanooga, TN
What I meant was, whatever you choose to use should be a nearly drop-in replacement in that script.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
22,039
Location
I am omnipresent
mubs said:
mubs said:
What do you use then, Merc?

I usually tar and bzip or gzip.

Winzip I don't actively resent using but I'm standing by my evaluation of WinRAR.

If anyone needs to rehash this, there was another thread here about WinRAR sucking. You can go read that.
 

LunarMist

I can't believe I'm a Fixture
Joined
Feb 1, 2003
Messages
17,264
Location
USA
Mercutio said:
I use the tried and true "people who use .RAR for anything are ugly and their files deserve to be ignored" method. So far I've found it works very well.

I may be ugly, but my files do not deserve to be ignored. :wink: I RARed ~540 gigabotes of data in one evening last week, no problem.
 
Top